Skip to content

Commit 56b50e8

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 3320363 commit 56b50e8

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
@@ -1550,6 +1550,8 @@ static int do_git_config_sequence(const struct config_options *opts,
15501550

15511551
if (opts->commondir)
15521552
repo_config = mkpathdup("%s/config", opts->commondir);
1553+
else if (opts->git_dir)
1554+
repo_config = mkpathdup("%s/config", opts->git_dir);
15531555
else
15541556
repo_config = NULL;
15551557

0 commit comments

Comments
 (0)