Skip to content

Commit ff0137a

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 b9e85f4 commit ff0137a

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

15431543
if (opts->commondir)
15441544
repo_config = mkpathdup("%s/config", opts->commondir);
1545+
else if (opts->git_dir)
1546+
repo_config = mkpathdup("%s/config", opts->git_dir);
15451547
else
15461548
repo_config = NULL;
15471549

0 commit comments

Comments
 (0)