From: Ian Jackson Date: Fri, 28 Jul 2017 17:27:36 +0000 (+0100) Subject: playground: playtree: rename from workarea X-Git-Tag: archive/debian/4.1~42 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=8b30674d5dbdebb3ad48bff887d99f5c4fea7984 playground: playtree: rename from workarea We are going to use "playground" for containing temporary directory, and playtree for git trees within it. Signed-off-by: Ian Jackson --- diff --git a/Debian/Dgit.pm b/Debian/Dgit.pm index 1d713b92..524ae18a 100644 --- a/Debian/Dgit.pm +++ b/Debian/Dgit.pm @@ -60,8 +60,8 @@ BEGIN { shellquote printcmd messagequote $negate_harmful_gitattrs changedir git_slurp_config_src - workarea_setup - fresh_workarea in_workarea); + playtree_setup + fresh_playtree in_playtree); # implicitly uses $main::us %EXPORT_TAGS = ( policyflags => [qw(NOFFCHECK FRESHREPO NOCOMMITCHECK)] ); @EXPORT_OK = ( qw($wa), @{ $EXPORT_TAGS{policyflags} } ); @@ -456,8 +456,8 @@ sub git_slurp_config_src ($) { return $r; } -sub workarea_setup ($) { - # for use in the workarea +sub playtree_setup ($) { + # for use in the playtree my ($t_local_git_cfg) = @_; # should be run in a directory .git/FOO/BAR of a working tree runcmd qw(git init -q); @@ -481,8 +481,8 @@ sub workarea_setup ($) { our $wa; our $local_git_cfg; -sub in_workarea ($;$) { - my $sub = pop @_; # in_workarea [$twa, sub { ... };] +sub in_playtree ($;$) { + my $sub = pop @_; # in_playtree [$twa, sub { ... };] # default $twa is global $wa (which caller must, in that case, set) # $twa should be relative paths of the form .git/FOO/BAR my ($twa) = @_; @@ -494,7 +494,7 @@ sub in_workarea ($;$) { return $r; } -sub fresh_workarea (;$) { +sub fresh_playtree (;$) { my ($twa) = @_; $twa //= $wa; $local_git_cfg //= git_slurp_config_src 'local'; @@ -502,7 +502,7 @@ sub fresh_workarea (;$) { mkdir $parent or $!==EEXIST or fail "failed to mkdir $parent: $!"; rmtree $twa; mkdir $twa or die "$twa $!"; - in_workarea sub { workarea_setup $local_git_cfg; }; + in_playtree sub { playtree_setup $local_git_cfg; }; } 1; diff --git a/dgit b/dgit index 6780af79..827dc62d 100755 --- a/dgit +++ b/dgit @@ -1679,7 +1679,7 @@ sub prep_ud (;$) { } sub mktree_in_ud_here () { - workarea_setup $gitcfgs{local}; + playtree_setup $gitcfgs{local}; } sub git_write_tree () {