diff options
Diffstat (limited to 'setup.c')
-rw-r--r-- | setup.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -808,3 +808,10 @@ const char *setup_git_directory(void) { return setup_git_directory_gently(NULL); } + +const char *resolve_gitdir(const char *suspect) +{ + if (is_git_directory(suspect)) + return suspect; + return read_gitfile_gently(suspect); +} |