global: prepare for hiding away repo-less config functions

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>
This commit is contained in:
Patrick Steinhardt 2024-08-13 11:14:21 +02:00 committed by Junio C Hamano
parent f7d61c4135
commit 219de841d9
23 changed files with 45 additions and 0 deletions

View File

@ -1,3 +1,5 @@
#define USE_THE_REPOSITORY_VARIABLE
#include "git-compat-util.h"
#include "config.h"
#include "gettext.h"

View File

@ -4,6 +4,7 @@
*/
#define PRECOMPOSE_UNICODE_C
#define USE_THE_REPOSITORY_VARIABLE
#include "git-compat-util.h"
#include "config.h"

View File

@ -1,3 +1,5 @@
#define USE_THE_REPOSITORY_VARIABLE
#include "git-compat-util.h"
#include "config.h"
#include "environment.h"

View File

@ -1,3 +1,5 @@
#define USE_THE_REPOSITORY_VARIABLE
#include "git-compat-util.h"
#include "abspath.h"
#include "config.h"

View File

@ -1,3 +1,5 @@
#define USE_THE_REPOSITORY_VARIABLE
#include "git-compat-util.h"
#include "abspath.h"
#include "config.h"

View File

@ -1,3 +1,5 @@
#define USE_THE_REPOSITORY_VARIABLE
#include "git-compat-util.h"
#include "abspath.h"
#include "advice.h"

View File

@ -1,3 +1,5 @@
#define USE_THE_REPOSITORY_VARIABLE
#include "git-compat-util.h"
#include "config.h"
#include "dir.h"

View File

@ -1,3 +1,5 @@
#define USE_THE_REPOSITORY_VARIABLE
#include "git-compat-util.h"
#include "commit.h"
#include "config.h"

View File

@ -1,3 +1,5 @@
#define USE_THE_REPOSITORY_VARIABLE
#include "git-compat-util.h"
#include "gettext.h"
#include "config.h"

View 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"

View File

@ -1,3 +1,5 @@
#define USE_THE_REPOSITORY_VARIABLE
#include "git-compat-util.h"
#include "config.h"
#include "gettext.h"

View 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"

View File

@ -1,3 +1,5 @@
#define USE_THE_REPOSITORY_VARIABLE
#include "git-compat-util.h"
#include "config.h"
#include "entry.h"

View File

@ -1,3 +1,5 @@
#define USE_THE_REPOSITORY_VARIABLE
#include "git-compat-util.h"
#include "config.h"
#include "environment.h"

2
refs.c
View File

@ -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"

View File

@ -1,3 +1,5 @@
#define USE_THE_REPOSITORY_VARIABLE
#include "../git-compat-util.h"
#include "../config.h"
#include "../dir.h"

View File

@ -1,3 +1,5 @@
#define USE_THE_REPOSITORY_VARIABLE
#include "../git-compat-util.h"
#include "../abspath.h"
#include "../chdir-notify.h"

View File

@ -1,3 +1,5 @@
#define USE_THE_REPOSITORY_VARIABLE
#include "git-compat-util.h"
#include "color.h"
#include "config.h"

View File

@ -1,3 +1,5 @@
#define USE_THE_REPOSITORY_VARIABLE
#include "test-tool.h"
#include "advice.h"
#include "config.h"

View File

@ -1,3 +1,5 @@
#define USE_THE_REPOSITORY_VARIABLE
#include "test-tool.h"
#include "config.h"
#include "setup.h"

View File

@ -1,3 +1,5 @@
#define USE_THE_REPOSITORY_VARIABLE
#include "test-tool.h"
#include "setup.h"
#include "userdiff.h"

View File

@ -1,3 +1,5 @@
#define USE_THE_REPOSITORY_VARIABLE
#include "git-compat-util.h"
#include "config.h"
#include "environment.h"

View File

@ -1,3 +1,5 @@
#define USE_THE_REPOSITORY_VARIABLE
#include "git-compat-util.h"
#include "config.h"
#include "strbuf.h"