Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
const char *repo_config;
int ret = 0;
+ get_common_dir(&sb, gitdir);
+ strbuf_addstr(&sb, "/config");
+ repo_config = sb.buf;
+
/*
* git_config() can't be used here because it calls git_pathdup()
* to get $GIT_CONFIG/config. That call will make setup_git_env()
* Use a gentler version of git_config() to check if this repo
* is a good one.
*/
- strbuf_addf(&sb, "%s/config", gitdir);
- repo_config = sb.buf;
git_config_early(check_repository_format_version, NULL, repo_config);
if (GIT_REPO_VERSION < repository_format_version) {
if (!nongit_ok)