chiark / gitweb /
git-debrebase: merge: Check that merge resolution is correct
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 11 Aug 2018 10:51:04 +0000 (11:51 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 11 Aug 2018 10:53:35 +0000 (11:53 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
git-debrebase

index 2b257dd6bfea76d923a1e3da918f10c4d911ac1d..3d8d6f33a5669c425721a55c3d1da2943308874f 100755 (executable)
@@ -1296,7 +1296,16 @@ sub walk ($;$$$) {
                    $cl->{MergeInterchangeBaseInfo},
                    @{ $cl->{Parents} };
                $last_anchor = $cl->{MergeBestAnchor};
-               # xxx need to check the tree somehow
+               my $check_differs = get_differs $build, $cl->{CommitId};
+               # Breakwater changes which were in each side of the
+               # merge should be in MergeCreateMergedBreakwaters
+               # output.  Upstream changes are exactly the result
+               # of merge_series.  So the only difference should
+               # be potential laundry results.
+               $nomerge->(sprintf
+                    "merge misresolved: tree is not the same (%s %s d.%#x)",
+                          $cl->{CommitId}, $build, $check_differs)
+                   if $check_differs & ~D_PAT_ADD;
                print "Merge resolution successful.\n";
                next;
            } else {