chiark / gitweb /
git-debrebase: merge: Do not sometimes drop the first patch!
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 11 Aug 2018 10:32:10 +0000 (11:32 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 11 Aug 2018 10:38:39 +0000 (11:38 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
git-debrebase

index 429e17d..72c6f3a 100755 (executable)
@@ -228,7 +228,7 @@ sub get_differs ($$) {
            unless $differs & (D_PAT_ADD|D_PAT_OTH);
     }
 
-    printdebug sprintf "get_differs %s, %s = %#x\n", $x, $y, $differs;
+    printdebug sprintf "get_differs %s %s = %#x\n", $x, $y, $differs;
 
     return $differs;
 }
@@ -395,6 +395,7 @@ sub merge_series ($$;@) {
                my @earlier;
                while (my $patch = <S>) {
                    chomp $patch or die $!;
+                   $prereq{$patch} //= {};
                    foreach my $earlier (@earlier) {
                        $prereq{$patch}{$earlier}{$s}++ and die;
                    }