summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2016-03-11 22:36:49 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-03-11 23:02:17 (GMT)
commit7875acb6ecf85a7dc29554d193955ce5e265764f (patch)
tree58b24619636ee321eaea313575b92e83dc636f0e /cache.h
parent4b0d1eebe95b8ed187ff06ae46d69d517c2b759f (diff)
downloadgit-7875acb6ecf85a7dc29554d193955ce5e265764f.zip
git-7875acb6ecf85a7dc29554d193955ce5e265764f.tar.gz
git-7875acb6ecf85a7dc29554d193955ce5e265764f.tar.bz2
wrap shared_repository global in get/set accessors
It would be useful to control access to the global shared_repository, so that we can lazily load its config. The first step to doing so is to make sure all access goes through a set of functions. This step is purely mechanical, and should result in no change of behavior. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/cache.h b/cache.h
index 02e38d1..fdb9583 100644
--- a/cache.h
+++ b/cache.h
@@ -651,7 +651,6 @@ extern int prefer_symlink_refs;
extern int log_all_ref_updates;
extern int warn_ambiguous_refs;
extern int warn_on_object_refname_ambiguity;
-extern int shared_repository;
extern const char *apply_default_whitespace;
extern const char *apply_default_ignorewhitespace;
extern const char *git_attributes_file;
@@ -664,6 +663,9 @@ extern size_t delta_base_cache_limit;
extern unsigned long big_file_threshold;
extern unsigned long pack_size_limit_cfg;
+void set_shared_repository(int value);
+int get_shared_repository(void);
+
/*
* Do replace refs need to be checked this run? This variable is
* initialized to true unless --no-replace-object is used or