threads / patch / 4775

patchgit-cvsexportcommit dies on merge commits

Subject: [PATCH] git-cvsexportcommit dies on merge commits

## tl;dr

One message between Jul 5, 2006 and Jul 5, 2006. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Peter Baumann· Jul 5, 2006, 13:25 UTC · lore
Signed-off-by: Peter Baumann <siprbaum@stud.informatik.uni-erlangen.de>
---
 git-cvsexportcommit.perl |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Show changes to git-cvsexportcommit.perl +2 −2
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];
-- 
1.4.0

← back to recent threads