diff options
-rw-r--r-- | setup.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -910,7 +910,9 @@ static const char *setup_git_directory_gently_1(int *nongit_ok) return setup_bare_git_dir(&cwd, offset, nongit_ok); offset_parent = offset; - while (--offset_parent > ceil_offset && cwd.buf[offset_parent] != '/'); + while (--offset_parent > ceil_offset && + !is_dir_sep(cwd.buf[offset_parent])) + ; /* continue */ if (offset_parent <= ceil_offset) return setup_nongit(cwd.buf, nongit_ok); if (one_filesystem) { |