{"thread":{"id":"4795","subject":"[BUGFIX][RESEND]git-cvsexportcommit can't handle merge commits correctly","startedAt":"2006-07-07T10:55:41Z","lastAt":"2006-07-09T23:12:36Z","messageCount":2,"participants":["Peter Baumann","Martin Langhoff (CatalystIT)"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"23354","messageId":"20060707105541.GA17004@xp.machine.xx","threadId":"4795","inReplyTo":null,"subject":"[BUGFIX][RESEND]git-cvsexportcommit can't handle merge commits correctly","fromName":"Peter Baumann","fromEmail":"siprbaum@stud.informatik.uni-erlangen.de","sentAt":"2006-07-07T10:55:41Z","receivedAt":"2006-07-07T10:55:41Z","isPatch":false,"sender":{"key":"waste.manager@gmx.de","avatar":null},"body":"git-cvsexportcommit should check if the parent (supplied on the cmdline) to use\nfor a merge commit is one of the real parents of the merge.\n\nBut it errors out if the _first_ parent doesn't match and never checks\nthe other parents.\n\nSigned-off-by: Peter Baumann <siprbaum@stud.informatik.uni-erlangen.de>\n---\nThis is a resend with an improved description, because my first attempt\ndidn't generate enough attention :-)\n\n git-cvsexportcommit.perl |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/git-cvsexportcommit.perl b/git-cvsexportcommit.perl\nindex d1051d0..5dcb2f9 100755\n--- a/git-cvsexportcommit.perl\n+++ b/git-cvsexportcommit.perl\n@@ -63,15 +63,15 @@ foreach my $p (@commit) {\n }\n \n if ($parent) {\n+    my $found;\n     # double check that it's a valid parent\n     foreach my $p (@parents) {\n-\tmy $found;\n \tif ($p eq $parent) {\n \t    $found = 1;\n \t    last;\n \t}; # found it\n-\tdie \"Did not find $parent in the parents for this commit!\";\n     }\n+    die \"Did not find $parent in the parents for this commit!\" if !$found;\n } else { # we don't have a parent from the cmdline...\n     if (@parents == 1) { # it's safe to get it from the commit\n \t$parent = $parents[0];\n-- \n1.4.0\n"},{"id":"23504","messageId":"44B18D64.9090409@catalyst.net.nz","threadId":"4795","inReplyTo":"20060707105541.GA17004@xp.machine.xx","subject":"Re: [BUGFIX][RESEND]git-cvsexportcommit can't handle merge commits correctly","fromName":"Martin Langhoff (CatalystIT)","fromEmail":"martin@catalyst.net.nz","sentAt":"2006-07-09T23:12:36Z","receivedAt":"2006-07-09T23:12:36Z","isPatch":false,"sender":{"key":"martin@laptop.org","avatar":null},"body":"Peter Baumann wrote:\n> git-cvsexportcommit should check if the parent (supplied on the cmdline) to use\n> for a merge commit is one of the real parents of the merge.\n> \n> But it errors out if the _first_ parent doesn't match and never checks\n> the other parents.\n> \n\nAck. Thanks for spotting this!\n\n\nm\n-- \n-----------------------------------------------------------------------\nMartin @ Catalyst .Net .NZ  Ltd, PO Box 11-053, Manners St,  Wellington\nWEB: http://catalyst.net.nz/           PHYS: Level 2, 150-154 Willis St\nOFFICE: +64(4)916-7224                              MOB: +64(21)364-017\n       Make things as simple as possible, but no simpler - Einstein\n-----------------------------------------------------------------------\n"}]}