replace_object: don't check read_replace_refs twice
Since e1111cef (inline lookup_replace_object() calls, May 15 2011) the read_replace_refs global variable is checked twice, once in lookup_replace_object() and once again in do_lookup_replace_object(). As do_lookup_replace_object() is called only from lookup_replace_object(), we can remove the check in do_lookup_replace_object(). Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Christian Couder committed
Dec 11, 2013 at 08:46 UTC
500a04f196d90ef3a426ff63f76b44df479efc7d
1 file changed
-3
replace_object.c
-3
@@ -97,9 +97,6 @@ const unsigned char *do_lookup_replace_object(const unsigned char *sha1)
97
int pos, depth = MAXREPLACEDEPTH;
98
const unsigned char *cur = sha1;
99
100
- if (!read_replace_refs)
101
- return sha1;
102
-
100
prepare_replace_object();
101
102
/* Try to recursively replace the object */