Git status delay
Richard H Lee
ricardohenrylee@gmail.com
Mon Dec 11 23:36:00 GMT 2017
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:
https://github.com/git/git/commit/57dd3dd28724a150e6c6d4c1c8363e1efd49c197.patch
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: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list