summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2017-06-28 16:59:00 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2017-07-08 18:54:00 +0100
commit1171def5bb4f2659d19718ad39c81c1aa6b162cd (patch)
tree86e20d9ad808ea1437c85719923d34c87f227bf3
parent7ad5d889f402e47dba2e51bb1907a505d93c8f38 (diff)
dgit: Provide no_local_git_config
Part of the fix to #865863. No callers yet, so no functional change. This function not only arranges not to call git config --local. Removing 'local' from @gitcfgsources also prevents various config lookup machinery from trying to find information in $cfg{local} now of course does not exist. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
-rwxr-xr-xdgit5
1 files changed, 5 insertions, 0 deletions
diff --git a/dgit b/dgit
index a009e41..51a2ccb 100755
--- a/dgit
+++ b/dgit
@@ -704,6 +704,11 @@ sub cfg {
"$us: distro or suite appears not to be (properly) supported";
}
+sub no_local_git_cfg () {
+ # needs to be called from pre_*
+ @gitcfgsources = grep { $_ ne 'local' } @gitcfgsources;
+}
+
sub access_basedistro__noalias () {
if (defined $idistro) {
return $idistro;