summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Baumann <siprbaum@stud.informatik.uni-erlangen.de>2006-07-07 10:55:41 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-07-09 07:46:56 (GMT)
commit135a522e3f0ddc85664b3cd094918f095ac76d79 (patch)
tree4ea5df02507258ae13486e56b69637d42fbfd9d9
parentd9bffc08fd2cec626e3a390fa4cc47587a8c7f9e (diff)
downloadgit-135a522e3f0ddc85664b3cd094918f095ac76d79.zip
git-135a522e3f0ddc85664b3cd094918f095ac76d79.tar.gz
git-135a522e3f0ddc85664b3cd094918f095ac76d79.tar.bz2
git-cvsexportcommit can't handle merge commits correctly
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>
-rwxr-xr-xgit-cvsexportcommit.perl4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-cvsexportcommit.perl b/git-cvsexportcommit.perl
index d1051d0..5dcb2f9 100755
--- a/git-cvsexportcommit.perl
+++ b/git-cvsexportcommit.perl
@@ -63,15 +63,15 @@ foreach my $p (@commit) {
}
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];