summaryrefslogtreecommitdiff
path: root/remote.h
diff options
context:
space:
mode:
authorMichael Schubert <mschub@elegosoft.com>2013-07-13 11:36:24 +0200
committerJunio C Hamano <gitster@pobox.com>2013-07-18 15:59:46 -0700
commit737c5a9cde708d6995c765b7c2e95033edd0a896 (patch)
tree46ce1379e667a81503b19b7a3e6785396ae42dec /remote.h
parentedca4152560522a431a51fc0a06147fc680b5b18 (diff)
downloadgit-737c5a9cde708d6995c765b7c2e95033edd0a896.tar.gz
fetch: make --prune configurablems/fetch-prune-configuration
Without "git fetch --prune", remote-tracking branches for a branch the other side already has removed will stay forever. Some people want to always run "git fetch --prune". To accommodate users who want to either prune always or when fetching from a particular remote, add two new configuration variables "fetch.prune" and "remote.<name>.prune": - "fetch.prune" allows to enable prune for all fetch operations. - "remote.<name>.prune" allows to change the behaviour per remote. The latter will naturally override the former, and the --[no-]prune option from the command line will override the configured default. Since --prune is a potentially destructive operation (Git doesn't keep reflogs for deleted references yet), we don't want to prune without users consent, so this configuration will not be on by default. Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Michael Schubert <mschub@elegosoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'remote.h')
-rw-r--r--remote.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/remote.h b/remote.h
index cf56724661..4db34980f6 100644
--- a/remote.h
+++ b/remote.h
@@ -40,6 +40,7 @@ struct remote {
int fetch_tags;
int skip_default_update;
int mirror;
+ int prune;
const char *receivepack;
const char *uploadpack;