]> git.ipfire.org Git - thirdparty/git.git/commitdiff
global: prepare for hiding away repo-less config functions
authorPatrick Steinhardt <ps@pks.im>
Tue, 13 Aug 2024 09:14:21 +0000 (11:14 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 13 Aug 2024 17:01:05 +0000 (10:01 -0700)
We're about to hide config functions that implicitly depend on
`the_repository` behind the `USE_THE_REPOSITORY_VARIABLE` macro. This
will uncover a bunch of dependents that transitively relied on the
global variable, but didn't define the macro yet.

Adapt them such that we define the macro to prepare for this change.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
23 files changed:
compat/fsmonitor/fsm-ipc-darwin.c
compat/precompose_utf8.c
connect.c
credential.c
daemon.c
editor.c
fsmonitor.c
gpg-interface.c
graph.c
imap-send.c
mailinfo.c
merge-ll.c
parallel-checkout.c
protocol.c
refs.c
refs/packed-backend.c
refs/reftable-backend.c
sideband.c
t/helper/test-advise.c
t/helper/test-config.c
t/helper/test-userdiff.c
trailer.c
versioncmp.c

index 52f4f29720619b73e800cac22bde0c8b18ea19b1..fe149a1b37436db34665f5a436ea9961a34aac36 100644 (file)
@@ -1,3 +1,5 @@
+#define USE_THE_REPOSITORY_VARIABLE
+
 #include "git-compat-util.h"
 #include "config.h"
 #include "gettext.h"
index 0bd5c24250a4fb717f61db6e03e40326ca1fad07..f7cc7b3be5975141e3f370954c7100c63842bbe0 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #define PRECOMPOSE_UNICODE_C
+#define USE_THE_REPOSITORY_VARIABLE
 
 #include "git-compat-util.h"
 #include "config.h"
index cf84e631e9f26658ade7af029751fbcaf2500612..6829ab397455c4df404364307d6bcfe79f0b0b0a 100644 (file)
--- a/connect.c
+++ b/connect.c
@@ -1,3 +1,5 @@
+#define USE_THE_REPOSITORY_VARIABLE
+
 #include "git-compat-util.h"
 #include "config.h"
 #include "environment.h"
index 4b1a2b94feff73d31d5682b44ce4bfd14f88594e..ee46351ce01510899702e0ec07f6c96d8c2a0a0d 100644 (file)
@@ -1,3 +1,5 @@
+#define USE_THE_REPOSITORY_VARIABLE
+
 #include "git-compat-util.h"
 #include "abspath.h"
 #include "config.h"
index 17d331b2f38465e295c019e534eff371ef3e6e49..c65b068b765f3dfff70fb83ade9a4efdb928a5b0 100644 (file)
--- a/daemon.c
+++ b/daemon.c
@@ -1,3 +1,5 @@
+#define USE_THE_REPOSITORY_VARIABLE
+
 #include "git-compat-util.h"
 #include "abspath.h"
 #include "config.h"
index e93b4fdb09c1a004cd89be0cb1b36fa97c9c54f8..6b9ce81d5fc0fdc44dbf75ac4eedf2f218300caa 100644 (file)
--- a/editor.c
+++ b/editor.c
@@ -1,3 +1,5 @@
+#define USE_THE_REPOSITORY_VARIABLE
+
 #include "git-compat-util.h"
 #include "abspath.h"
 #include "advice.h"
index 2b17d60bbbecb0e0e53a934b4376e2207649e826..28130f748f7009a1e2ca978c0f17f835f31521b7 100644 (file)
@@ -1,3 +1,5 @@
+#define USE_THE_REPOSITORY_VARIABLE
+
 #include "git-compat-util.h"
 #include "config.h"
 #include "dir.h"
index 5c824aeb257cb94ccb16297e17fa00df973fd36c..6587085cd19fc0cd7994262a97f75661945a303b 100644 (file)
@@ -1,3 +1,5 @@
+#define USE_THE_REPOSITORY_VARIABLE
+
 #include "git-compat-util.h"
 #include "commit.h"
 #include "config.h"
diff --git a/graph.c b/graph.c
index 1ca34770ee8139f25e0a2476c5aa3cd8b06fb89c..091c14cf4fbcf5d129b2c7363ad4e971c62bd08e 100644 (file)
--- a/graph.c
+++ b/graph.c
@@ -1,3 +1,5 @@
+#define USE_THE_REPOSITORY_VARIABLE
+
 #include "git-compat-util.h"
 #include "gettext.h"
 #include "config.h"
index 01404e5047c83167275a02c36836e730d3db8e20..b2eb3d2dd0d0b55d8396c64aa1803084b97c2599 100644 (file)
@@ -21,6 +21,8 @@
  *  along with this program; if not, see <https://www.gnu.org/licenses/>.
  */
 
+#define USE_THE_REPOSITORY_VARIABLE
+
 #include "git-compat-util.h"
 #include "config.h"
 #include "credential.h"
index 94b9b0abf228b891bc1df5a71bcd96807ed982a8..95228531a6606abbbeaefbaaad81d6ac4928627f 100644 (file)
@@ -1,3 +1,5 @@
+#define USE_THE_REPOSITORY_VARIABLE
+
 #include "git-compat-util.h"
 #include "config.h"
 #include "gettext.h"
index 180c19df6737fe13404095ccbc5d65a880ff3a68..badb6dea57cb3b9eb5fe8402b403954e8a9feea4 100644 (file)
@@ -4,6 +4,8 @@
  * Copyright (c) 2007 Junio C Hamano
  */
 
+#define USE_THE_REPOSITORY_VARIABLE
+
 #include "git-compat-util.h"
 #include "config.h"
 #include "convert.h"
index 08b960aac84b0dc327de0a9e6ab2ffce8b195a55..01736f1352a5dc58886dfd3cb05a46d2a32e829d 100644 (file)
@@ -1,3 +1,5 @@
+#define USE_THE_REPOSITORY_VARIABLE
+
 #include "git-compat-util.h"
 #include "config.h"
 #include "entry.h"
index 079ba75acf4e84451a80aa764cad3ac77a7d667f..bae7226ff4074f1f37a350bc4c901156af19bf27 100644 (file)
@@ -1,3 +1,5 @@
+#define USE_THE_REPOSITORY_VARIABLE
+
 #include "git-compat-util.h"
 #include "config.h"
 #include "environment.h"
diff --git a/refs.c b/refs.c
index 0afc70b51b1e80bd8f617b778bacd57f98a840bf..284c64dfc50b65eea83876f1422b55e7f9d4aa28 100644 (file)
--- a/refs.c
+++ b/refs.c
@@ -2,6 +2,8 @@
  * The backend-independent part of the reference module.
  */
 
+#define USE_THE_REPOSITORY_VARIABLE
+
 #include "git-compat-util.h"
 #include "advice.h"
 #include "config.h"
index 89976aa35937388bcd104649ea6051291814863a..ba2ad90d10575717a8a9bf7ffd1f5caa29eb2de9 100644 (file)
@@ -1,3 +1,5 @@
+#define USE_THE_REPOSITORY_VARIABLE
+
 #include "../git-compat-util.h"
 #include "../config.h"
 #include "../dir.h"
index bf4446afd3c571e38216527cb976337626e51f3a..df67923d21762a41af2e7a1d66351d053a9b2069 100644 (file)
@@ -1,3 +1,5 @@
+#define USE_THE_REPOSITORY_VARIABLE
+
 #include "../git-compat-util.h"
 #include "../abspath.h"
 #include "../chdir-notify.h"
index 5d8907151fec3982e906025fc19c2165ef4572d3..5b6b872a1c8873d9e2694657e337d673ef33108d 100644 (file)
@@ -1,3 +1,5 @@
+#define USE_THE_REPOSITORY_VARIABLE
+
 #include "git-compat-util.h"
 #include "color.h"
 #include "config.h"
index 8a3fd0009a042c67019a3e89e5727dc4b7240600..6967c8e25c686012d46963a139cf004f69e0728e 100644 (file)
@@ -1,3 +1,5 @@
+#define USE_THE_REPOSITORY_VARIABLE
+
 #include "test-tool.h"
 #include "advice.h"
 #include "config.h"
index ed444ca4c25fbf2c581d5f950609c218b53a341c..e193079ed54a7a1b1617607420b6d75e116ee643 100644 (file)
@@ -1,3 +1,5 @@
+#define USE_THE_REPOSITORY_VARIABLE
+
 #include "test-tool.h"
 #include "config.h"
 #include "setup.h"
index 0ce31ce59f54fe972b2d8c1fd16af6bb5a2c24fd..94c48ababbefd097d1c7934a1b587d4f4a54db8f 100644 (file)
@@ -1,3 +1,5 @@
+#define USE_THE_REPOSITORY_VARIABLE
+
 #include "test-tool.h"
 #include "setup.h"
 #include "userdiff.h"
index 72e5136c73d194b20d9bf6c0ff17a40b40239a05..682d74505bfbb93eef72baa1d3b9971024b579e9 100644 (file)
--- a/trailer.c
+++ b/trailer.c
@@ -1,3 +1,5 @@
+#define USE_THE_REPOSITORY_VARIABLE
+
 #include "git-compat-util.h"
 #include "config.h"
 #include "environment.h"
index 45e676cbca6314d1b65c11e76f754898f060dfda..e3b2a6e330a3e830d4ef1a953a209716313646f5 100644 (file)
@@ -1,3 +1,5 @@
+#define USE_THE_REPOSITORY_VARIABLE
+
 #include "git-compat-util.h"
 #include "config.h"
 #include "strbuf.h"