]> git.ipfire.org Git - thirdparty/git.git/commit
config: hide functions using `the_repository` by default
authorPatrick Steinhardt <ps@pks.im>
Tue, 13 Aug 2024 09:14:23 +0000 (11:14 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 13 Aug 2024 17:01:05 +0000 (10:01 -0700)
commit036876a106739504c9a45d17f620cc34acd2f874
treeab94f4bffd0c49cb376b784c1618f98a00ff7928
parent219de841d9436d759fa52ea60625b60cda8476fd
config: hide functions using `the_repository` by default

The config subsystem provides a bunch of legacy functions that read or
set configuration for `the_repository`. The use of those functions is
discouraged, and it is easy to miss the implicit dependency on
`the_repository` that calls to those functions may cause.

Move all config-related functions that use `the_repository` into a block
that gets only conditionally compiled depending on whether or not the
macro has been defined. This also removes all dependencies on that
variable in "config.c", allowing us to remove the definition of said
preprocessor macro.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
config.c
config.h