summaryrefslogtreecommitdiff
path: root/builtin/config.c
diff options
context:
space:
mode:
authorLibravatar Patrick Steinhardt <ps@pks.im>2021-04-19 14:31:08 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-04-19 14:16:59 -0700
commitc62a999c6e595692ee3bd8ff1e9435491872a79c (patch)
treebbda6898b85ce5893693498835ed11fd2681ef9a /builtin/config.c
parentThe eighth batch (diff)
downloadtgif-c62a999c6e595692ee3bd8ff1e9435491872a79c.tar.xz
config: rename `git_etc_config()`
The `git_etc_gitconfig()` function retrieves the system-level path of the configuration file. We're about to introduce a way to override it via an environment variable, at which point the name of this function would start to become misleading. Rename the function to `git_system_config()` as a preparatory step. While at it, the function is also refactored to pass memory ownership to the caller. This is done to better match semantics of `git_global_config()`, which is going to be introduced in the next commit. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/config.c')
-rw-r--r--builtin/config.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/config.c b/builtin/config.c
index f71fa39b38..02ed0b3fe7 100644
--- a/builtin/config.c
+++ b/builtin/config.c
@@ -695,7 +695,7 @@ int cmd_config(int argc, const char **argv, const char *prefix)
}
}
else if (use_system_config) {
- given_config_source.file = git_etc_gitconfig();
+ given_config_source.file = git_system_config();
given_config_source.scope = CONFIG_SCOPE_SYSTEM;
} else if (use_local_config) {
given_config_source.file = git_pathdup("config");