Skip to content

Commit

Permalink
replace_object: don't check read_replace_refs twice
Browse files Browse the repository at this point in the history
Since e1111ce (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 <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
chriscool authored and gitster committed Dec 12, 2013
1 parent ffe68cf commit 500a04f
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions replace_object.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,6 @@ const unsigned char *do_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 */
Expand Down

0 comments on commit 500a04f

Please sign in to comment.