config: report a bug if git_dir exists without commondir
This did happen at some stage, and was fixed relatively quickly. Make sure that we detect very quickly, too, should that happen again. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
d166e6afe5
commit
44004872c8
2
config.c
2
config.c
@ -1668,6 +1668,8 @@ static int do_git_config_sequence(const struct config_options *opts,
|
|||||||
|
|
||||||
if (opts->commondir)
|
if (opts->commondir)
|
||||||
repo_config = mkpathdup("%s/config", opts->commondir);
|
repo_config = mkpathdup("%s/config", opts->commondir);
|
||||||
|
else if (opts->git_dir)
|
||||||
|
BUG("git_dir without commondir");
|
||||||
else
|
else
|
||||||
repo_config = NULL;
|
repo_config = NULL;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user