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>
This commit is contained in:

committed by
Junio C Hamano

parent
cc400f5011
commit
dae556bdb1
@ -94,6 +94,9 @@ const unsigned char *lookup_replace_object(const unsigned char *sha1)
|
||||
int pos, depth = MAXREPLACEDEPTH;
|
||||
const unsigned char *cur = sha1;
|
||||
|
||||
if (!read_replace_refs)
|
||||
return sha1;
|
||||
|
||||
prepare_replace_object();
|
||||
|
||||
/* Try to recursively replace the object */
|
||||
|
Reference in New Issue
Block a user