chiark / gitweb /
git-debrebase: merge: Do wreckage cleaning separately
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 11 Aug 2018 19:13:41 +0000 (20:13 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 11 Aug 2018 19:13:41 +0000 (20:13 +0100)
git-update-ref hates us if we delete a ref and reintroduce it, in the
same transaction.  In this case we don't mind doing it in two goes.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
git-debrebase

index 3ac087c..25ebbe6 100755 (executable)
@@ -391,6 +391,9 @@ sub merge_failed ($$;@) {
 
     my @updates;
     merge_wreckage_cleaning \@updates;
+    run_ref_updates_now "merge failed", \@updates;
+
+    @updates = ();
     keys %$wrecknotes;
     while (my ($k,$v) = each %$wrecknotes) {
        push @updates, "create $wrecknoteprefix/$k $v";