diff --git a/config.c b/config.c index 8fd766588a..6fc4d3292e 100644 --- a/config.c +++ b/config.c @@ -1649,6 +1649,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;