chiark / gitweb /
git-debrebase: merge: Use a fresh branch and check out again
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 11 Aug 2018 19:23:50 +0000 (20:23 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 11 Aug 2018 19:23:50 +0000 (20:23 +0100)
We are going to want this in a moment.

No overall functional change.

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

index d9b95a2..18bc21f 100755 (executable)
@@ -597,6 +597,7 @@ sub merge_series ($$$;@) {
        $mwrecknote->('merged-patchqueue', $merged_pq);
 
        printdebug "merge_series series gbp pq import\n";
+       runcmd @git, qw(checkout -q -b mergec), $merged_pq;
 
        merge_attempt_cmd($wrecknotes, qw(gbp pq import));
 
@@ -605,7 +606,7 @@ sub merge_series ($$$;@) {
 
        printdebug "merge_series series ok, building...\n";
        my $build = $newbase;
-       my @lcmd = (@git, qw(rev-list --reverse merge..patch-queue/merge));
+       my @lcmd = (@git, qw(rev-list --reverse mergec..patch-queue/mergec));
        foreach my $c (grep /./, split /\n/, cmdoutput @lcmd) {
            my $commit = git_cat_file $c, 'commit';
            printdebug "merge_series series ok, building $c\n";