aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-02-06 14:31:20 -0800
committerJunio C Hamano <gitster@pobox.com>2024-02-06 14:31:20 -0800
commit76bb1896de15c8d358e5adad298c90cafa98aaf5 (patch)
tree8ca4ea1c3bc9420fbffb8644a3587590c4f708db
parent00e0bc3bd739c992000913ec40e5e0785a811db0 (diff)
parent1cb3b92fc6540007c62c300f33b501681dc4f897 (diff)
downloadgit-76bb1896de15c8d358e5adad298c90cafa98aaf5.tar.gz
Merge branch 'kh/maintenance-use-xdg-when-it-should'
Comment fix. * kh/maintenance-use-xdg-when-it-should: config: add back code comment
-rw-r--r--builtin/config.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/builtin/config.c b/builtin/config.c
index 08fe36d499..b55bfae7d6 100644
--- a/builtin/config.c
+++ b/builtin/config.c
@@ -710,6 +710,12 @@ int cmd_config(int argc, const char **argv, const char *prefix)
if (use_global_config) {
given_config_source.file = git_global_config();
if (!given_config_source.file)
+ /*
+ * It is unknown if HOME/.gitconfig exists, so
+ * we do not know if we should write to XDG
+ * location; error out even if XDG_CONFIG_HOME
+ * is set and points at a sane location.
+ */
die(_("$HOME not set"));
given_config_source.scope = CONFIG_SCOPE_GLOBAL;
} else if (use_system_config) {