From: Ian Jackson Date: Thu, 24 Aug 2017 14:55:19 +0000 (+0100) Subject: git-debrebase: wip fixes for new no global $playground X-Git-Tag: archive/debian/5.0~326 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=025a34d5ceee06d7fc673b5c6f131c0f72f3c3af;p=dgit.git git-debrebase: wip fixes for new no global $playground --- 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;