From: "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>,
Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: [PATCH 1/3] setup_git_directory(): handle UNC paths correctly
Date: Sat, 24 Aug 2019 15:10:44 -0700 (PDT) [thread overview]
Message-ID: <bb29fcd20d3e3f59ed5d65f04148d73770f542b2.1566684643.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.141.git.gitgitgadget@gmail.com>
From: Johannes Schindelin <johannes.schindelin@gmx.de>
The first offset in a UNC path is not the host name, but the folder name after that.
This fixes https://github.com/git-for-windows/git/issues/1181
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
setup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup.c b/setup.c
index ca9e8a949e..a803b3ade3 100644
--- a/setup.c
+++ b/setup.c
@@ -906,7 +906,7 @@ static enum discovery_result setup_git_directory_gently_1(struct strbuf *dir,
const char *env_ceiling_dirs = getenv(CEILING_DIRECTORIES_ENVIRONMENT);
struct string_list ceiling_dirs = STRING_LIST_INIT_DUP;
const char *gitdirenv;
- int ceil_offset = -1, min_offset = has_dos_drive_prefix(dir->buf) ? 3 : 1;
+ int ceil_offset = -1, min_offset = offset_1st_component(dir->buf);
dev_t current_device = 0;
int one_filesystem = 1;
--
gitgitgadget
next prev parent reply other threads:[~2019-08-24 22:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-24 22:10 [PATCH 0/3] Handle worktrees at the top of a network drive Johannes Schindelin via GitGitGadget
2019-08-24 22:10 ` Johannes Schindelin via GitGitGadget [this message]
2019-08-24 22:10 ` [PATCH 2/3] Fix .git/ discovery at the root of UNC shares Johannes Schindelin via GitGitGadget
2019-08-24 22:10 ` [PATCH 3/3] setup_git_directory(): handle UNC root paths correctly Johannes Schindelin via GitGitGadget
2019-08-26 17:08 ` [PATCH 0/3] Handle worktrees at the top of a network drive Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bb29fcd20d3e3f59ed5d65f04148d73770f542b2.1566684643.git.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=johannes.schindelin@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).