Skip to content

Commit 763dac7

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 4b85023 commit 763dac7

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
@@ -889,7 +889,7 @@ static enum discovery_result setup_git_directory_gently_1(struct strbuf *dir,
889889
const char *env_ceiling_dirs = getenv(CEILING_DIRECTORIES_ENVIRONMENT);
890890
struct string_list ceiling_dirs = STRING_LIST_INIT_DUP;
891891
const char *gitdirenv;
892-
int ceil_offset = -1, min_offset = has_dos_drive_prefix(dir->buf) ? 3 : 1;
892+
int ceil_offset = -1, min_offset = offset_1st_component(dir->buf);
893893
dev_t current_device = 0;
894894
int one_filesystem = 1;
895895

0 commit comments

Comments
 (0)