Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/path.c
diff options
context:
space:
mode:
Diffstat (limited to 'path.c')
-rw-r--r--path.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/path.c b/path.c
index 7340e11d7d..a346134462 100644
--- a/path.c
+++ b/path.c
@@ -438,8 +438,13 @@ const char *enter_repo(const char *path, int strict)
return NULL;
path = validated_path;
}
- else if (chdir(path))
- return NULL;
+ else {
+ const char *gitfile = read_gitfile(path);
+ if (gitfile)
+ path = gitfile;
+ if (chdir(path))
+ return NULL;
+ }
if (is_git_directory(".")) {
set_git_dir(".");