Skip to content

Commit 744fad6

Browse files
committed
Merge branch 'js/config-sequence'
A sanity check for start-up sequence has been added in the config API codepath. * js/config-sequence: config: report a bug if git_dir exists without commondir
2 parents 06a2d24 + 4400487 commit 744fad6

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

16691669
if (opts->commondir)
16701670
repo_config = mkpathdup("%s/config", opts->commondir);
1671+
else if (opts->git_dir)
1672+
BUG("git_dir without commondir");
16711673
else
16721674
repo_config = NULL;
16731675

0 commit comments

Comments
 (0)