diff options
author | Michael Haggerty <mhagger@alum.mit.edu> | 2014-02-18 12:24:55 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-02-20 14:16:55 -0800 |
commit | afc711b8e1ee89626f0dddf0ef01fb73168d47ca (patch) | |
tree | 5d5211df96c4e9d0a45ee12b0a062e2d10c7a170 /cache.h | |
parent | 5f95c9f850b19b368c43ae399cc831b17a26a5ac (diff) | |
download | git-afc711b8e1ee89626f0dddf0ef01fb73168d47ca.tar.gz git-afc711b8e1ee89626f0dddf0ef01fb73168d47ca.tar.xz |
rename read_replace_refs to check_replace_refs
The semantics of this flag was changed in commit
e1111cef23 inline lookup_replace_object() calls
but wasn't renamed at the time to minimize code churn. Rename it now,
and add a comment explaining its use.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r-- | cache.h | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -580,7 +580,17 @@ extern size_t packed_git_limit; extern size_t delta_base_cache_limit; extern unsigned long big_file_threshold; extern unsigned long pack_size_limit_cfg; -extern int read_replace_refs; + +/* + * Do replace refs need to be checked this run? This variable is + * initialized to true unless --no-replace-object is used or + * $GIT_NO_REPLACE_OBJECTS is set, but is set to false by some + * commands that do not want replace references to be active. As an + * optimization it is also set to false if replace references have + * been sought but there were none. + */ +extern int check_replace_refs; + extern int fsync_object_files; extern int core_preload_index; extern int core_apply_sparse_checkout; @@ -791,7 +801,7 @@ static inline void *read_sha1_file(const unsigned char *sha1, enum object_type * extern const unsigned char *do_lookup_replace_object(const unsigned char *sha1); static inline const unsigned char *lookup_replace_object(const unsigned char *sha1) { - if (!read_replace_refs) + if (!check_replace_refs) return sha1; return do_lookup_replace_object(sha1); } |