diff options
| author | Junio C Hamano <gitster@pobox.com> | 2011-05-19 20:37:21 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2011-05-19 20:37:21 -0700 |
| commit | 61d7503da141f13bc916b36012760791761cc909 (patch) | |
| tree | 2b1cff95e16f2ed1543e4790d682e2e4996e92b7 /replace_object.c | |
| parent | 2d220862d43b4d54f3173f67956fc5221690fb7e (diff) | |
| parent | 5bf29b950063c8fa2f3666cb6cf2ca20be61f3d1 (diff) | |
| download | git-61d7503da141f13bc916b36012760791761cc909.tar.gz | |
Merge branch 'jc/replacing'
* jc/replacing:
read_sha1_file(): allow selective bypassing of replacement mechanism
inline lookup_replace_object() calls
read_sha1_file(): get rid of read_sha1_file_repl() madness
t6050: make sure we test not just commit replacement
Declare lookup_replace_object() in cache.h, not in commit.h
Conflicts:
environment.c
Diffstat (limited to 'replace_object.c')
| -rw-r--r-- | replace_object.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/replace_object.c b/replace_object.c index 7c6c7544ad..d0b1548726 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; |
