summaryrefslogtreecommitdiff
path: root/git-debrebase
diff options
context:
space:
mode:
Diffstat (limited to 'git-debrebase')
-rwxr-xr-xgit-debrebase17
1 files changed, 12 insertions, 5 deletions
diff --git a/git-debrebase b/git-debrebase
index ce348e2..52a06d3 100755
--- a/git-debrebase
+++ b/git-debrebase
@@ -1348,6 +1348,17 @@ sub cmd_conclude () {
do_stitch 'quick';
}
+sub make_patches_staged ($$) {
+ my ($bw, $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 qw(gbp pq export);
+ runcmd @git, qw(add debian/patches);
+ };
+}
+
sub cmd_convert_from_gbp () {
badusage "needs 1 optional argument, the upstream git rev"
unless @ARGV<=1;
@@ -1422,13 +1433,9 @@ sub cmd_convert_to_gbp () {
my $head = get_head();
my (undef, undef, undef, $ffq, $gdrlast) = ffq_prev_branchinfo();
my ($anchor, $bw) = keycommits $head, 0;
- fresh_workarea();
my $out;
+ make_patches_staged $bw, $head;
in_workarea sub {
- runcmd @git, qw(checkout -q -b bw), $bw;
- runcmd @git, qw(checkout -q -b patch-queue/bw), $head;
- runcmd qw(gbp pq export);
- runcmd @git, qw(add debian/patches);
$out = make_commit ['HEAD'], [
'Commit patch queue (converted from git-debrebase format)',
'[git-debrebase convert-to-gbp: commit patches]',