diff options
author | Patrick Steinhardt <ps@pks.im> | 2024-09-12 13:30:01 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-09-12 19:15:42 +0200 |
commit | 673af418d0f271faadb24486348430e547d32d2a (patch) | |
tree | 350e205229a62ed858d512a2b578ef36bf49cb98 /name-hash.c | |
parent | environment: reorder header to split out `the_repository`-free section (diff) | |
download | git-673af418d0f271faadb24486348430e547d32d2a.tar.xz git-673af418d0f271faadb24486348430e547d32d2a.zip |
environment: guard state depending on a repository
In "environment.h" we have quite a lot of functions and variables that
either explicitly or implicitly depend on `the_repository`.
The implicit set of stateful declarations includes for example variables
which get populated when parsing a repository's Git configuration. This
set of variables is broken by design, as their state often depends on
the last repository config that has been parsed. So they may or may not
represent the state of `the_repository`.
Fixing that is quite a big undertaking, and later patches in this series
will demonstrate a solution for a first small set of those variables. So
for now, let's guard these with `USE_THE_REPOSITORY_VARIABLE` so that
callers are aware of the implicit dependency.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'name-hash.c')
-rw-r--r-- | name-hash.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/name-hash.c b/name-hash.c index 3a58ce03d9..95528e3bcd 100644 --- a/name-hash.c +++ b/name-hash.c @@ -5,6 +5,9 @@ * * Copyright (C) 2008 Linus Torvalds */ + +#define USE_THE_REPOSITORY_VARIABLE + #include "git-compat-util.h" #include "environment.h" #include "gettext.h" |