X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=replace_object.c;h=d0b1548726e9d2362d27c6947eb61a0647d0eac2;hb=e681a93a98bf2ab1ef672ed70c81f0c0fbea68b5;hp=7c6c7544ada4585e62341f0c0854a919f10c2277;hpb=69d61daec7a7915f6a664f32002fd9403e7f2a34;p=git.git diff --git a/replace_object.c b/replace_object.c index 7c6c7544a..d0b154872 100644 --- a/replace_object.c +++ b/replace_object.c @@ -85,12 +85,14 @@ static void prepare_replace_object(void) for_each_replace_ref(register_replace_ref, NULL); replace_object_prepared = 1; + if (!replace_object_nr) + read_replace_refs = 0; } /* We allow "recursive" replacement. Only within reason, though */ #define MAXREPLACEDEPTH 5 -const unsigned char *lookup_replace_object(const unsigned char *sha1) +const unsigned char *do_lookup_replace_object(const unsigned char *sha1) { int pos, depth = MAXREPLACEDEPTH; const unsigned char *cur = sha1;