summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2017-08-24 15:55:19 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2018-06-16 12:25:49 +0100
commit025a34d5ceee06d7fc673b5c6f131c0f72f3c3af (patch)
treebe81f7572ad7fe844faf794555eba9dbec3d274b
parent4297c0a55a779c5fbc5032b962d1bd766b33b581 (diff)
git-debrebase: wip fixes for new no global $playground
-rwxr-xr-xgit-debrebase11
1 files changed, 4 insertions, 7 deletions
diff --git a/git-debrebase b/git-debrebase
index c999dd6..b2c15d6 100755
--- a/git-debrebase
+++ b/git-debrebase
@@ -144,21 +144,19 @@ sub D_PAT_OTH () { return 0x8; } # debian/patches other changes
our $playprefix = 'debrebase';
our $rd;
+our $workarea;
our @git = qw(git);
sub in_workarea ($) {
my ($sub) = @_;
- changedir "$playground/work";
+ changedir $workarea;
my $r = eval { $sub->(); };
changedir $maindir;
}
sub fresh_workarea () {
- do {
- local $playground;
- fresh_playground "$playprefix/work";
- };
+ $workarea = fresh_playground "$playprefix/work";
in_workarea sub { playtree_setup };
}
@@ -707,8 +705,7 @@ enabledebug if $debuglevel;
my $toplevel = cmdoutput @git, qw(rev-parse --show-toplevel);
chdir $toplevel or die "chdir $toplevel: $!";
-fresh_playground $playprefix;
-$rd = ensure_a_playground "playprefix/misc";
+$rd = fresh_playground "$playprefix/misc";
my $cmd = shift @ARGV;
my $cmdfn = $cmd;