summaryrefslogtreecommitdiff
path: root/upload-pack.c
diff options
context:
space:
mode:
authorChristian Couder <chriscool@tuxfamily.org>2009-01-23 10:07:46 +0100
committerJunio C Hamano <gitster@pobox.com>2009-05-31 17:02:59 -0700
commitdae556bdb1e2ad6fb5eafe82e975bde01029fca9 (patch)
tree40c26f7e70c36888ae3197162d49280eb92c5a4f /upload-pack.c
parentcc400f50112a58471b992a54b1a05d99a8a82457 (diff)
downloadgit-dae556bdb1e2ad6fb5eafe82e975bde01029fca9.tar.gz
environment: add global variable to disable replacement
This new "read_replace_refs" global variable is set to 1 by default, so that replace refs are used by default. But reachability traversal and packing commands ("cmd_fsck", "cmd_prune", "cmd_pack_objects", "upload_pack", "cmd_unpack_objects") set it to 0, as they must work with the original DAG. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'upload-pack.c')
-rw-r--r--upload-pack.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/upload-pack.c b/upload-pack.c
index edc7861228..e6c4f347eb 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -618,6 +618,7 @@ int main(int argc, char **argv)
int strict = 0;
git_extract_argv0_path(argv[0]);
+ read_replace_refs = 0;
for (i = 1; i < argc; i++) {
char *arg = argv[i];