From dae556bdb1e2ad6fb5eafe82e975bde01029fca9 Mon Sep 17 00:00:00 2001 From: Christian Couder Date: Fri, 23 Jan 2009 10:07:46 +0100 Subject: 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 Signed-off-by: Junio C Hamano --- builtin-pack-objects.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'builtin-pack-objects.c') diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c index 9742b45c4..b2c93d3d2 100644 --- a/builtin-pack-objects.c +++ b/builtin-pack-objects.c @@ -2103,6 +2103,8 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix) int rp_ac_alloc = 64; int rp_ac; + read_replace_refs = 0; + rp_av = xcalloc(rp_ac_alloc, sizeof(*rp_av)); rp_av[0] = "pack-objects"; -- cgit v1.2.1