chiark / gitweb /
git-debrebase: Run gbp pq export only from (perhaps private) laundered branch
[dgit.git] / git-debrebase
index 52a06d37c17ccecbc9ab3241c63c03375031262f..7d5d5bdd72254bc0dcbac180037d0355095d58cb 100755 (executable)
@@ -1348,12 +1348,15 @@ sub cmd_conclude () {
     do_stitch 'quick';
 }
 
-sub make_patches_staged ($$) {
-    my ($bw, $head) = @_;
+sub make_patches_staged ($) {
+    my ($head) = @_;
+    # Produces the patches that would result from $head if it were
+    # laundered.
+    my ($secret_head, $secret_bw, $last_anchor) = walk $head;
     fresh_workarea();
     in_workarea sub {
-       runcmd @git, qw(checkout -q -b bw), $bw;
-       runcmd @git, qw(checkout -q -b patch-queue/bw), $head;
+       runcmd @git, qw(checkout -q -b bw), $secret_bw;
+       runcmd @git, qw(checkout -q -b patch-queue/bw), $secret_head;
        runcmd qw(gbp pq export);
        runcmd @git, qw(add debian/patches);
     };
@@ -1432,9 +1435,9 @@ sub cmd_convert_to_gbp () {
     badusage "no arguments allowed" if @ARGV;
     my $head = get_head();
     my (undef, undef, undef, $ffq, $gdrlast) = ffq_prev_branchinfo();
-    my ($anchor, $bw) = keycommits $head, 0;
+    keycommits $head, 0;
     my $out;
-    make_patches_staged $bw, $head;
+    make_patches_staged $head;
     in_workarea sub {
        $out = make_commit ['HEAD'], [
             'Commit patch queue (converted from git-debrebase format)',