chiark / gitweb /
git-debrebase: fix misdetection of breakwater declarations as other pseudomerges
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 10 Feb 2018 15:20:10 +0000 (15:20 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 16 Jun 2018 11:25:49 +0000 (12:25 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
git-debrebase

index 87928bc55db59739c1ec7875826f1969e48641a9..bc92cfab4b88d08cb874a79c0413bbb95bfab81d 100755 (executable)
@@ -405,7 +405,11 @@ sub classify ($) {
     }
 
     my @identical = grep { !$_->{Differs} } @p;
-    if (@p == 2 && @identical == 1) {
+    if (@p == 2 && @identical == 1 &&
+       $r->{Msg} !~ m{^\[git-debrebase breakwater.*\]$}m
+       # breakwater merges can look like pseudomerges, if they are
+       # "declare" commits (ie, there are no upstream changes)
+       ) {
        my @overwritten = grep { $_->{Differs} } @p;
        confess "internal error $objid ?" unless @overwritten==1;
        return $classify->(qw(Pseudomerge),