This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Git status delay

On 21/11/2017 10:27, Adam Dinwoodie wrote:
(I believe this is a bug in Git, on the grounds that (a) Git in general
supports POSIX systems and giving special meaning to paths starting with
`\\` is allowed, if unusual, POSIX behaviour, and (b) Git specifically
supports Cygwin, and this is very well documented Cygwin behaviour.)

I updated Cygwin and this problem has been fixed. Here's the upstream commit:

What happened previously was that when is_git_directory("/") was called, git blindly appended "/HEAD" to the path, causing "//HEAD" (i.e. a network share) to be lstatted. The commit fixes this by only appending the '/' before "HEAD" only if it does not end in it already. Hence "/HEAD" is now lstatted as it should be.

In the name of being able to report this usefully upstream (and ideally
being able to reproduce it myself) can you give me a bit more
information about your environment?
I think the reason why so few people experienced this issue was that certain people have ISPs that use DNS hijacking. This is where non-existent DNS names are resolved to a catch-all IP address. They do this to monetise domain name typos. E.g. if someone mistypes the DNS part of the URL, the ISP's "not found" page will display adverts based upon terms extracted from the URL.

So if you lstat("//HEAD") and you are on a network that does DNS hijacking, Cygwin will attempt to connect to the ISP's server via SMB. As the ISP's server is a publicly facing IP address, it probably just black holes any incoming connection requests. So instead of receiving an immediate connection refusal, the TCP connection request just times out. This timeout was the cause of the delay.

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]