git-am: Add am.keepcr and --no-keep-cr to override it
[gitweb.git] / replace_object.c
index b23e1cd52a455bbe1e55efb589440f1ac3894455..eb59604fd39e2beaf7d43802499c27305ac92132 100644 (file)
@@ -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 */