From 2162a1956ae5599e3a56c0ab319d0ea7548440fb Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Thu, 13 Jul 2017 22:55:36 +0200 Subject: [PATCH] do_git_config_sequence(): fall back to git_dir if commondir is NULL Signed-off-by: Johannes Schindelin --- config.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config.c b/config.c index 09949b7580..1a0e950c3c 100644 --- a/config.c +++ b/config.c @@ -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;