diff options
Diffstat (limited to 'Debian')
-rw-r--r-- | Debian/Dgit.pm | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/Debian/Dgit.pm b/Debian/Dgit.pm index 1977666..515a32f 100644 --- a/Debian/Dgit.pm +++ b/Debian/Dgit.pm @@ -61,8 +61,10 @@ BEGIN { changedir git_slurp_config_src playtree_setup); # implicitly uses $main::us - %EXPORT_TAGS = ( policyflags => [qw(NOFFCHECK FRESHREPO NOCOMMITCHECK)] ); - @EXPORT_OK = @{ $EXPORT_TAGS{policyflags} }; + %EXPORT_TAGS = ( policyflags => [qw(NOFFCHECK FRESHREPO NOCOMMITCHECK)], + playground => [qw($local_git_cfg)]); + @EXPORT_OK = ( @{ $EXPORT_TAGS{policyflags} }, + @{ $EXPORT_TAGS{playground} } ); } our @EXPORT_OK; @@ -454,9 +456,17 @@ sub git_slurp_config_src ($) { return $r; } -sub playtree_setup ($) { - # for use in the playtree +# ========== playground handling ========== + +# $local_git_cfg hash of arrays of values: git config from $maindir + +our $local_git_cfg; + +# ----- playtrees ----- + +sub playtree_setup (;$) { my ($t_local_git_cfg) = @_; + $t_local_git_cfg //= $local_git_cfg; # should be run in a directory .git/FOO/BAR of a working tree runcmd qw(git init -q); runcmd qw(git config gc.auto 0); @@ -476,6 +486,4 @@ sub playtree_setup ($) { close GA or die $!; } -our $local_git_cfg; - 1; |