Skip to content

Commit 2be7d89

Browse files
committed
do_git_config_sequence(): fall back to git_dir if commondir is NULL
Signed-off-by: Johannes Schindelin <[email protected]>
1 parent f5598c8 commit 2be7d89

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

config.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1532,6 +1532,8 @@ static int do_git_config_sequence(const struct config_options *opts,
15321532

15331533
if (opts->commondir)
15341534
repo_config = mkpathdup("%s/config", opts->commondir);
1535+
else if (opts->git_dir)
1536+
repo_config = mkpathdup("%s/config", opts->git_dir);
15351537
else
15361538
repo_config = NULL;
15371539

0 commit comments

Comments
 (0)