summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2016-10-09 12:11:38 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2016-10-10 01:01:10 +0100
commit55139a910de527575606d9efa0defdbf28c96c65 (patch)
tree11ef9fdc97ed17a57f6e180ae499443ebba05306 /dgit
parent86c633c36acd0e386f5190cadf7ae0a2abd4ef5a (diff)
Arrange for the special dgit remote to be skipped by git fetch --all etc.
Closes:#827892. Not quite the patch from Sean: we want to do this on every fetch, and we don't overwrite the user's configuration if for some reason they have set this (hopefully they haven't...) Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'dgit')
-rwxr-xr-xdgit9
1 files changed, 9 insertions, 0 deletions
diff --git a/dgit b/dgit
index a96f471..34152ee 100755
--- a/dgit
+++ b/dgit
@@ -2136,6 +2136,8 @@ sub mergeinfo_version ($) {
}
sub fetch_from_archive () {
+ ensure_setup_existing_tree();
+
# Ensures that lrref() is what is actually in the archive, one way
# or another, according to us - ie this client's
# appropritaely-updated archive view. Also returns the commit id.
@@ -2535,6 +2537,13 @@ sub setup_useremail (;$) {
$setup->('name', 'DEBFULLNAME');
}
+sub ensure_setup_existing_tree () {
+ my $k = "remote.$remotename.skipdefaultupdate";
+ my $c = git_get_config $k;
+ return if defined $c;
+ set_local_git_config $k, 'true';
+}
+
sub setup_new_tree () {
setup_mergechangelogs();
setup_useremail();