diff options
Diffstat (limited to 'path.c')
-rw-r--r-- | path.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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("."); |