Skip to content

Commit e589eec

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 5f291d6 commit e589eec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

setup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -890,7 +890,7 @@ static enum discovery_result setup_git_directory_gently_1(struct strbuf *dir,
890890
const char *env_ceiling_dirs = getenv(CEILING_DIRECTORIES_ENVIRONMENT);
891891
struct string_list ceiling_dirs = STRING_LIST_INIT_DUP;
892892
const char *gitdirenv;
893-
int ceil_offset = -1, min_offset = has_dos_drive_prefix(dir->buf) ? 3 : 1;
893+
int ceil_offset = -1, min_offset = offset_1st_component(dir->buf);
894894
dev_t current_device = 0;
895895
int one_filesystem = 1;
896896

0 commit comments

Comments
 (0)