Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2019-12-31 16:17:48 +0300
committerJunio C Hamano <gitster@pobox.com>2020-01-02 21:18:42 +0300
commit44143583b76decf93c55b73adaf2367c22c88998 (patch)
tree92bb370732ff55ea5ba0c0232dfab14826ffc992 /cache.h
parent761e3d26bbe44c51f83c4f1ad198461f57029ebd (diff)
sparse-checkout: use extern for global variables
When the core.sparseCheckoutCone config setting was added in 879321eb0b ("sparse-checkout: add 'cone' mode" 2019-11-21), the variables storing the config values for core.sparseCheckout and core.sparseCheckoutCone were rearranged in cache.h, but in doing so the "extern" keyword was dropped. While we are tending to drop the "extern" keyword for function declarations, it is still necessary for global variables used across multiple *.c files. The impact of not having the extern keyword may be unpredictable. Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/cache.h b/cache.h
index d3c89e7a53..097f5883ac 100644
--- a/cache.h
+++ b/cache.h
@@ -925,8 +925,8 @@ extern int protect_hfs;
extern int protect_ntfs;
extern const char *core_fsmonitor;
-int core_apply_sparse_checkout;
-int core_sparse_checkout_cone;
+extern int core_apply_sparse_checkout;
+extern int core_sparse_checkout_cone;
/*
* Include broken refs in all ref iterations, which will