Skip to content

Commit 482b792

Browse files
committed
setup_git_directory(): handle UNC paths correctly
The first offset in a UNC path is not the host name, but the folder name after that. This fixes #1181 Signed-off-by: Johannes Schindelin <[email protected]>
1 parent aa72043 commit 482b792

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

setup.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,7 @@ static enum discovery_result setup_git_directory_gently_1(struct strbuf *dir,
893893
const char *env_ceiling_dirs = getenv(CEILING_DIRECTORIES_ENVIRONMENT);
894894
struct string_list ceiling_dirs = STRING_LIST_INIT_DUP;
895895
const char *gitdirenv;
896-
int ceil_offset = -1, min_offset = has_dos_drive_prefix(dir->buf) ? 3 : 1;
896+
int ceil_offset = -1, min_offset = offset_1st_component(dir->buf);
897897
dev_t current_device = 0;
898898
int one_filesystem = 1;
899899

0 commit comments

Comments
 (0)