chiark / gitweb /
git-debrebase: document that breakwater merges always have single parent
[dgit.git] / git-debrebase
index 22cdfa6405b4c8c884a7f017f4e143e06658fa0c..5808cf33f7f1b702f29c5e57b1ef01e707a0428f 100755 (executable)
@@ -283,7 +283,7 @@ sub calculate_committer_authline () {
 #
 #   BreakwaterUpstreamMerge
 #     has additional entry in classification result
-#       OrigParents = [ subset of Parents ]
+#       OrigParents = [ subset of Parents ]  # singleton list
 
 sub classify ($) {
     my ($objid) = @_;
@@ -667,7 +667,13 @@ sub walk ($;$$) {
            } else {
                confess "$method ?";
            }
-           $rewriting ||= $cl ne pop @processed;
+           if (!$rewriting) {
+               my $procd = (pop @processed) // 'UNDEF';
+               if ($cl ne $procd) {
+                   $rewriting = 1;
+                   printdebug "WALK REWRITING NOW cl=$cl procd=$procd\n";
+               }
+           }
            my $newtree = cmdoutput @git, qw(write-tree);
            my $ch = $cl->{Hdr};
            $ch =~ s{^tree .*}{tree $newtree}m or confess "$ch ?";