From 025a34d5ceee06d7fc673b5c6f131c0f72f3c3af Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 24 Aug 2017 15:55:19 +0100 Subject: [PATCH] git-debrebase: wip fixes for new no global $playground --- git-debrebase | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/git-debrebase b/git-debrebase index c999dd62..b2c15d6f 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; -- 2.30.2