Skip to content

Commit 76bb189

Browse files
committed
Merge branch 'kh/maintenance-use-xdg-when-it-should'
Comment fix. * kh/maintenance-use-xdg-when-it-should: config: add back code comment
2 parents 00e0bc3 + 1cb3b92 commit 76bb189

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

builtin/config.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,12 @@ int cmd_config(int argc, const char **argv, const char *prefix)
710710
if (use_global_config) {
711711
given_config_source.file = git_global_config();
712712
if (!given_config_source.file)
713+
/*
714+
* It is unknown if HOME/.gitconfig exists, so
715+
* we do not know if we should write to XDG
716+
* location; error out even if XDG_CONFIG_HOME
717+
* is set and points at a sane location.
718+
*/
713719
die(_("$HOME not set"));
714720
given_config_source.scope = CONFIG_SCOPE_GLOBAL;
715721
} else if (use_system_config) {

0 commit comments

Comments
 (0)