diff --git a/replace_object.c b/replace_object.c
index b23e1cd52a455bbe1e55efb589440f1ac3894455..eb59604fd39e2beaf7d43802499c27305ac92132 100644 (file)
--- a/replace_object.c
+++ b/replace_object.c
int pos, depth = MAXREPLACEDEPTH;
const unsigned char *cur = sha1;
+ if (!read_replace_refs)
+ return sha1;
+
prepare_replace_object();
/* Try to recursively replace the object */