File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -346,6 +346,10 @@ static int check_repository_format_gently(const char *gitdir, int *nongit_ok)
346346 const char * repo_config ;
347347 int ret = 0 ;
348348
349+ get_common_dir (& sb , gitdir );
350+ strbuf_addstr (& sb , "/config" );
351+ repo_config = sb .buf ;
352+
349353 /*
350354 * git_config() can't be used here because it calls git_pathdup()
351355 * to get $GIT_CONFIG/config. That call will make setup_git_env()
@@ -355,8 +359,6 @@ static int check_repository_format_gently(const char *gitdir, int *nongit_ok)
355359 * Use a gentler version of git_config() to check if this repo
356360 * is a good one.
357361 */
358- strbuf_addf (& sb , "%s/config" , gitdir );
359- repo_config = sb .buf ;
360362 git_config_early (check_repository_format_version , NULL , repo_config );
361363 if (GIT_REPO_VERSION < repository_format_version ) {
362364 if (!nongit_ok )
You can’t perform that action at this time.
0 commit comments