do_git_config_sequence(): fall back to git_dir if commondir is NULL

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
Johannes Schindelin
2017-07-13 22:55:36 +02:00
committed by Jameson Miller
parent 616647b67e
commit 08331c70d4

View File

@@ -1668,6 +1668,8 @@ static int do_git_config_sequence(const struct config_options *opts,
if (opts->commondir)
repo_config = mkpathdup("%s/config", opts->commondir);
else if (opts->git_dir)
repo_config = mkpathdup("%s/config", opts->git_dir);
else
repo_config = NULL;