git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: git@vger.kernel.org
Cc: Justin Tobler <jltobler@gmail.com>, Junio C Hamano <gitster@pobox.com>
Subject: [PATCH v2 19/20] global: prepare for hiding away repo-less config functions
Date: Tue, 13 Aug 2024 11:14:21 +0200	[thread overview]
Message-ID: <124f5794e6677da0ca3cac1e90c381ebb43fdca6.1723540226.git.ps@pks.im> (raw)
In-Reply-To: <cover.1723540226.git.ps@pks.im>

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>
---
 compat/fsmonitor/fsm-ipc-darwin.c | 2 ++
 compat/precompose_utf8.c          | 1 +
 connect.c                         | 2 ++
 credential.c                      | 2 ++
 daemon.c                          | 2 ++
 editor.c                          | 2 ++
 fsmonitor.c                       | 2 ++
 gpg-interface.c                   | 2 ++
 graph.c                           | 2 ++
 imap-send.c                       | 2 ++
 mailinfo.c                        | 2 ++
 merge-ll.c                        | 2 ++
 parallel-checkout.c               | 2 ++
 protocol.c                        | 2 ++
 refs.c                            | 2 ++
 refs/packed-backend.c             | 2 ++
 refs/reftable-backend.c           | 2 ++
 sideband.c                        | 2 ++
 t/helper/test-advise.c            | 2 ++
 t/helper/test-config.c            | 2 ++
 t/helper/test-userdiff.c          | 2 ++
 trailer.c                         | 2 ++
 versioncmp.c                      | 2 ++
 23 files changed, 45 insertions(+)

diff --git a/compat/fsmonitor/fsm-ipc-darwin.c b/compat/fsmonitor/fsm-ipc-darwin.c
index 52f4f29720..fe149a1b37 100644
--- a/compat/fsmonitor/fsm-ipc-darwin.c
+++ b/compat/fsmonitor/fsm-ipc-darwin.c
@@ -1,3 +1,5 @@
+#define USE_THE_REPOSITORY_VARIABLE
+
 #include "git-compat-util.h"
 #include "config.h"
 #include "gettext.h"
diff --git a/compat/precompose_utf8.c b/compat/precompose_utf8.c
index 0bd5c24250..f7cc7b3be5 100644
--- a/compat/precompose_utf8.c
+++ b/compat/precompose_utf8.c
@@ -4,6 +4,7 @@
  */
 
 #define PRECOMPOSE_UNICODE_C
+#define USE_THE_REPOSITORY_VARIABLE
 
 #include "git-compat-util.h"
 #include "config.h"
diff --git a/connect.c b/connect.c
index cf84e631e9..6829ab3974 100644
--- 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"
diff --git a/credential.c b/credential.c
index 4b1a2b94fe..ee46351ce0 100644
--- a/credential.c
+++ b/credential.c
@@ -1,3 +1,5 @@
+#define USE_THE_REPOSITORY_VARIABLE
+
 #include "git-compat-util.h"
 #include "abspath.h"
 #include "config.h"
diff --git a/daemon.c b/daemon.c
index 17d331b2f3..c65b068b76 100644
--- 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"
diff --git a/editor.c b/editor.c
index e93b4fdb09..6b9ce81d5f 100644
--- 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"
diff --git a/fsmonitor.c b/fsmonitor.c
index 2b17d60bbb..28130f748f 100644
--- a/fsmonitor.c
+++ b/fsmonitor.c
@@ -1,3 +1,5 @@
+#define USE_THE_REPOSITORY_VARIABLE
+
 #include "git-compat-util.h"
 #include "config.h"
 #include "dir.h"
diff --git a/gpg-interface.c b/gpg-interface.c
index 5c824aeb25..6587085cd1 100644
--- a/gpg-interface.c
+++ b/gpg-interface.c
@@ -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 1ca34770ee..091c14cf4f 100644
--- 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"
diff --git a/imap-send.c b/imap-send.c
index 01404e5047..b2eb3d2dd0 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -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"
diff --git a/mailinfo.c b/mailinfo.c
index 94b9b0abf2..95228531a6 100644
--- a/mailinfo.c
+++ b/mailinfo.c
@@ -1,3 +1,5 @@
+#define USE_THE_REPOSITORY_VARIABLE
+
 #include "git-compat-util.h"
 #include "config.h"
 #include "gettext.h"
diff --git a/merge-ll.c b/merge-ll.c
index 180c19df67..badb6dea57 100644
--- a/merge-ll.c
+++ b/merge-ll.c
@@ -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"
diff --git a/parallel-checkout.c b/parallel-checkout.c
index 08b960aac8..01736f1352 100644
--- a/parallel-checkout.c
+++ b/parallel-checkout.c
@@ -1,3 +1,5 @@
+#define USE_THE_REPOSITORY_VARIABLE
+
 #include "git-compat-util.h"
 #include "config.h"
 #include "entry.h"
diff --git a/protocol.c b/protocol.c
index 079ba75acf..bae7226ff4 100644
--- a/protocol.c
+++ b/protocol.c
@@ -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 0afc70b51b..284c64dfc5 100644
--- 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"
diff --git a/refs/packed-backend.c b/refs/packed-backend.c
index 89976aa359..ba2ad90d10 100644
--- a/refs/packed-backend.c
+++ b/refs/packed-backend.c
@@ -1,3 +1,5 @@
+#define USE_THE_REPOSITORY_VARIABLE
+
 #include "../git-compat-util.h"
 #include "../config.h"
 #include "../dir.h"
diff --git a/refs/reftable-backend.c b/refs/reftable-backend.c
index bf4446afd3..df67923d21 100644
--- a/refs/reftable-backend.c
+++ b/refs/reftable-backend.c
@@ -1,3 +1,5 @@
+#define USE_THE_REPOSITORY_VARIABLE
+
 #include "../git-compat-util.h"
 #include "../abspath.h"
 #include "../chdir-notify.h"
diff --git a/sideband.c b/sideband.c
index 5d8907151f..5b6b872a1c 100644
--- a/sideband.c
+++ b/sideband.c
@@ -1,3 +1,5 @@
+#define USE_THE_REPOSITORY_VARIABLE
+
 #include "git-compat-util.h"
 #include "color.h"
 #include "config.h"
diff --git a/t/helper/test-advise.c b/t/helper/test-advise.c
index 8a3fd0009a..6967c8e25c 100644
--- a/t/helper/test-advise.c
+++ b/t/helper/test-advise.c
@@ -1,3 +1,5 @@
+#define USE_THE_REPOSITORY_VARIABLE
+
 #include "test-tool.h"
 #include "advice.h"
 #include "config.h"
diff --git a/t/helper/test-config.c b/t/helper/test-config.c
index ed444ca4c2..e193079ed5 100644
--- a/t/helper/test-config.c
+++ b/t/helper/test-config.c
@@ -1,3 +1,5 @@
+#define USE_THE_REPOSITORY_VARIABLE
+
 #include "test-tool.h"
 #include "config.h"
 #include "setup.h"
diff --git a/t/helper/test-userdiff.c b/t/helper/test-userdiff.c
index 0ce31ce59f..94c48ababb 100644
--- a/t/helper/test-userdiff.c
+++ b/t/helper/test-userdiff.c
@@ -1,3 +1,5 @@
+#define USE_THE_REPOSITORY_VARIABLE
+
 #include "test-tool.h"
 #include "setup.h"
 #include "userdiff.h"
diff --git a/trailer.c b/trailer.c
index 72e5136c73..682d74505b 100644
--- 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"
diff --git a/versioncmp.c b/versioncmp.c
index 45e676cbca..e3b2a6e330 100644
--- a/versioncmp.c
+++ b/versioncmp.c
@@ -1,3 +1,5 @@
+#define USE_THE_REPOSITORY_VARIABLE
+
 #include "git-compat-util.h"
 #include "config.h"
 #include "strbuf.h"
-- 
2.46.0.46.g406f326d27.dirty


  parent reply	other threads:[~2024-08-13  9:14 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-07  6:56 [PATCH 00/20] Stop using `the_repository` in "config.c" Patrick Steinhardt
2024-08-07  6:56 ` [PATCH 01/20] path: expose `do_git_path()` as `repo_git_pathv()` Patrick Steinhardt
2024-08-09 16:58   ` Justin Tobler
2024-08-13  9:25     ` Patrick Steinhardt
2024-08-07  6:56 ` [PATCH 02/20] path: expose `do_git_common_path()` as `strbuf_git_common_pathv()` Patrick Steinhardt
2024-08-09 17:18   ` Justin Tobler
2024-08-09 17:32     ` Junio C Hamano
2024-08-13  9:25       ` Patrick Steinhardt
2024-08-13 15:12         ` Junio C Hamano
2024-08-07  6:56 ` [PATCH 03/20] editor: do not rely on `the_repository` for interactive edits Patrick Steinhardt
2024-08-09 17:36   ` Justin Tobler
2024-08-07  6:57 ` [PATCH 04/20] hooks: remove implicit dependency on `the_repository` Patrick Steinhardt
2024-08-07  6:57 ` [PATCH 05/20] path: stop relying on `the_repository` when reporting garbage Patrick Steinhardt
2024-08-07  6:57 ` [PATCH 06/20] path: stop relying on `the_repository` in `worktree_git_path()` Patrick Steinhardt
2024-08-09 19:02   ` Justin Tobler
2024-08-13  9:25     ` Patrick Steinhardt
2024-08-07  6:57 ` [PATCH 07/20] path: hide functions using `the_repository` by default Patrick Steinhardt
2024-08-09 19:43   ` Justin Tobler
2024-08-13  9:25     ` Patrick Steinhardt
2024-08-07  6:57 ` [PATCH 08/20] config: introduce missing setters that take repo as parameter Patrick Steinhardt
2024-08-09 20:07   ` Justin Tobler
2024-08-13  9:25     ` Patrick Steinhardt
2024-08-07  6:57 ` [PATCH 09/20] config: expose `repo_config_clear()` Patrick Steinhardt
2024-08-07  6:57 ` [PATCH 10/20] config: pass repo to `git_config_get_index_threads()` Patrick Steinhardt
2024-08-07  6:57 ` [PATCH 11/20] config: pass repo to `git_config_get_split_index()` Patrick Steinhardt
2024-08-07  6:57 ` [PATCH 12/20] config: pass repo to `git_config_get_max_percent_split_change()` Patrick Steinhardt
2024-08-07  6:57 ` [PATCH 13/20] config: pass repo to `git_config_get_expiry()` Patrick Steinhardt
2024-08-07  6:57 ` [PATCH 14/20] config: pass repo to `git_config_get_expiry_in_days()` Patrick Steinhardt
2024-08-09 20:21   ` Justin Tobler
2024-08-09 21:14     ` Junio C Hamano
2024-08-07  6:57 ` [PATCH 15/20] config: pass repo to `git_die_config()` Patrick Steinhardt
2024-08-07  6:57 ` [PATCH 16/20] config: pass repo to functions that rename or copy sections Patrick Steinhardt
2024-08-07  6:58 ` [PATCH 17/20] config: don't have setters depend on `the_repository` Patrick Steinhardt
2024-08-07  6:58 ` [PATCH 18/20] config: don't depend on `the_repository` with branch conditions Patrick Steinhardt
2024-08-09 20:47   ` Justin Tobler
2024-08-13  9:25     ` Patrick Steinhardt
2024-08-07  6:58 ` [PATCH 19/20] global: prepare for hiding away repo-less config functions Patrick Steinhardt
2024-08-09 20:57   ` Justin Tobler
2024-08-07  6:58 ` [PATCH 20/20] config: hide functions using `the_repository` by default Patrick Steinhardt
2024-08-09 21:13   ` Justin Tobler
2024-08-07  9:48 ` [PATCH 00/20] Stop using `the_repository` in "config.c" Ghanshyam Thakkar
2024-08-07 13:11   ` Patrick Steinhardt
2024-08-13  9:13 ` [PATCH v2 " Patrick Steinhardt
2024-08-13  9:13   ` [PATCH v2 01/20] path: expose `do_git_path()` as `repo_git_pathv()` Patrick Steinhardt
2024-08-13  9:13   ` [PATCH v2 02/20] path: expose `do_git_common_path()` as `repo_common_pathv()` Patrick Steinhardt
2024-08-13  9:13   ` [PATCH v2 03/20] editor: do not rely on `the_repository` for interactive edits Patrick Steinhardt
2024-08-13  9:13   ` [PATCH v2 04/20] hooks: remove implicit dependency on `the_repository` Patrick Steinhardt
2024-08-13  9:13   ` [PATCH v2 05/20] path: stop relying on `the_repository` when reporting garbage Patrick Steinhardt
2024-08-14 18:28     ` Calvin Wan
2024-08-15  5:26       ` Patrick Steinhardt
2024-08-13  9:13   ` [PATCH v2 06/20] path: stop relying on `the_repository` in `worktree_git_path()` Patrick Steinhardt
2024-08-13  9:13   ` [PATCH v2 07/20] path: hide functions using `the_repository` by default Patrick Steinhardt
2024-08-13  9:13   ` [PATCH v2 08/20] config: introduce missing setters that take repo as parameter Patrick Steinhardt
2024-08-13  9:13   ` [PATCH v2 09/20] config: expose `repo_config_clear()` Patrick Steinhardt
2024-08-13  9:13   ` [PATCH v2 10/20] config: pass repo to `git_config_get_index_threads()` Patrick Steinhardt
2024-08-13  9:13   ` [PATCH v2 11/20] config: pass repo to `git_config_get_split_index()` Patrick Steinhardt
2024-08-13  9:13   ` [PATCH v2 12/20] config: pass repo to `git_config_get_max_percent_split_change()` Patrick Steinhardt
2024-08-13  9:13   ` [PATCH v2 13/20] config: pass repo to `git_config_get_expiry()` Patrick Steinhardt
2024-08-13  9:14   ` [PATCH v2 14/20] config: pass repo to `git_config_get_expiry_in_days()` Patrick Steinhardt
2024-08-13  9:14   ` [PATCH v2 15/20] config: pass repo to `git_die_config()` Patrick Steinhardt
2024-08-13  9:14   ` [PATCH v2 16/20] config: pass repo to functions that rename or copy sections Patrick Steinhardt
2024-08-13  9:14   ` [PATCH v2 17/20] config: don't have setters depend on `the_repository` Patrick Steinhardt
2024-08-13  9:14   ` [PATCH v2 18/20] config: don't depend on `the_repository` with branch conditions Patrick Steinhardt
2024-08-13  9:14   ` Patrick Steinhardt [this message]
2024-08-13  9:14   ` [PATCH v2 20/20] config: hide functions using `the_repository` by default Patrick Steinhardt
2024-08-13 17:07   ` [PATCH v2 00/20] Stop using `the_repository` in "config.c" Junio C Hamano
2024-08-14 19:29   ` Calvin Wan
2024-08-15  5:13     ` Patrick Steinhardt
2024-08-15  0:58   ` Justin Tobler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=124f5794e6677da0ca3cac1e90c381ebb43fdca6.1723540226.git.ps@pks.im \
    --to=ps@pks.im \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jltobler@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).