summaryrefslogtreecommitdiff
path: root/replace_object.c
diff options
context:
space:
mode:
Diffstat (limited to 'replace_object.c')
-rw-r--r--replace_object.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/replace_object.c b/replace_object.c
index b23e1cd..eb59604 100644
--- a/replace_object.c
+++ b/replace_object.c
@@ -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 */