chiark / gitweb /
git-debrebase: fresh_workarea: Support $subdir
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 11 Aug 2018 19:13:08 +0000 (20:13 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 11 Aug 2018 19:13:08 +0000 (20:13 +0100)
And use this in merge_series.

NFC.

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

index 7f96749..3ac087c 100755 (executable)
@@ -128,8 +128,10 @@ sub in_workarea ($) {
     die $@ if $@;
 }
 
-sub fresh_workarea () {
-    $workarea = fresh_playground "$playprefix/work";
+sub fresh_workarea (;$) {
+    my ($subdir) = @_;
+    $subdir //= 'work';
+    $workarea = fresh_playground "$playprefix/$subdir";
     in_workarea sub { playtree_setup };
 }
 
@@ -450,7 +452,8 @@ sub merge_series ($$$;@) {
        }
     };
 
-    local $workarea = fresh_playground "$playprefix/merge";
+    local $workarea;
+    fresh_workarea "merge";
     my $seriesfile = "debian/patches/series";
     in_workarea sub {
        playtree_setup();