chiark / gitweb /
Split brain: Actually get gbp pq output back onto dgit-view branch
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 28 Nov 2015 17:40:53 +0000 (17:40 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 16 Jul 2016 15:47:47 +0000 (16:47 +0100)
And explain why in a comment.

dgit

diff --git a/dgit b/dgit
index a3e62c71379efb803e4925c13bad2fa9f17a9d7a..0812f32ae2e48338a2686ffae70bfcb5050bc580 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -2575,7 +2575,8 @@ sub quiltify_splitbrain ($$$$$) {
        progress "creating patches-applied version using gbp-pq";
        open STDOUT, ">/dev/null" or die $!;
        runcmd shell_cmd 'exec >/dev/null', @gbppq, qw(import);
-       runcmd @git, qw(update-ref dgit-view HEAD);
+       # gbp-pq import creates a fresh branch; push back to dgit-view
+       runcmd @git, qw(update-ref refs/heads/dgit-view HEAD);
        runcmd @git, qw(checkout dgit-view);
     }
     if (($diffbits->{H2O} & 02) && # user has modified .gitignore