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} } );
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);
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) = @_;
return $r;
}
-sub fresh_workarea (;$) {
+sub fresh_playtree (;$) {
my ($twa) = @_;
$twa //= $wa;
$local_git_cfg //= git_slurp_config_src 'local';
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;