Skip to content

Commit

Permalink
git-cvsexportcommit can't handle merge commits correctly
Browse files Browse the repository at this point in the history
git-cvsexportcommit should check if the parent (supplied on the cmdline) to use
for a merge commit is one of the real parents of the merge.

But it errors out if the _first_ parent doesn't match and never checks
the other parents.

Signed-off-by: Peter Baumann <siprbaum@stud.informatik.uni-erlangen.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Peter Baumann authored and Junio C Hamano committed Jul 9, 2006
1 parent d9bffc0 commit 135a522
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions git-cvsexportcommit.perl
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@
}

if ($parent) {
my $found;
# double check that it's a valid parent
foreach my $p (@parents) {
my $found;
if ($p eq $parent) {
$found = 1;
last;
}; # found it
die "Did not find $parent in the parents for this commit!";
}
die "Did not find $parent in the parents for this commit!" if !$found;
} else { # we don't have a parent from the cmdline...
if (@parents == 1) { # it's safe to get it from the commit
$parent = $parents[0];
Expand Down

0 comments on commit 135a522

Please sign in to comment.