Skip to content

Commit b17385a

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 9840731 commit b17385a

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

0 commit comments

Comments
 (0)