chiark / gitweb /
dgit: Copy several user.* settings from main tree git local config
[dgit.git] / dgit
diff --git a/dgit b/dgit
index 9cdf96b5226d80c378ec6f69eed37ad26b4f3e25..7ffbb89b8303d895a6520bb063137c3f2f7c4824 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -1699,6 +1699,11 @@ sub prep_ud (;$) {
 sub mktree_in_ud_here () {
     runcmd qw(git init -q);
     runcmd qw(git config gc.auto 0);
+    foreach my $copy (qw(user.email user.name user.useConfigOnly)) {
+       my $v = $gitcfgs{local}{$copy};
+       next unless $v;
+       runcmd qw(git config), $copy, $_ foreach @$v;
+    }
     rmtree('.git/objects');
     symlink '../../../../objects','.git/objects' or die $!;
     setup_gitattrs(1);