All of lore.kernel.org
 help / color / mirror / Atom feed
* git tries to stat //HEAD when searching for a repo, leading to huge delays on Cygwin
@ 2017-11-02 23:45 Andrew Baumann
  2017-11-03  1:03 ` Jeff King
  2017-11-03  1:06 ` [PATCH] setup.c: don't try to access '//HEAD' during repo discovery SZEDER Gábor
  0 siblings, 2 replies; 6+ messages in thread
From: Andrew Baumann @ 2017-11-02 23:45 UTC (permalink / raw)
  To: git

Hi,

I have a workaround for this, but someone on stack overflow [1] suggested reporting it upstream, so here you go:

I have a fancy shell prompt that executes "git rev-parse --is-inside-work-tree" to determine whether we're currently inside a working directory. This causes git to walk up the directory hierarchy looking for a containing git repo. For example, when invoked from my home directory, it stats the following paths, in order:

/home/me/.git
/home/me/.git/HEAD
/home/me/HEAD
/home
/home/.git
/home/.git/HEAD
/home/HEAD
/
/.git
/.git/HEAD
//HEAD

The last name (//HEAD) interacts badly with Cygwin, which interprets it as a UNC file share, and so demand-loads a bunch of extra DLLs and attempts to resolve/contact the server named HEAD. This obviously doesn't work too well, especially over a slow network link.

I've tested with the latest Cygwin git (2.15.0); this was also present in a prior version.

Cheers,
Andrew

[1] https://stackoverflow.com/questions/47084672

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-11-03 18:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-02 23:45 git tries to stat //HEAD when searching for a repo, leading to huge delays on Cygwin Andrew Baumann
2017-11-03  1:03 ` Jeff King
2017-11-03 12:32   ` Johannes Schindelin
2017-11-03 18:29     ` Jeff King
2017-11-03  1:06 ` [PATCH] setup.c: don't try to access '//HEAD' during repo discovery SZEDER Gábor
2017-11-03 12:36   ` Johannes Schindelin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.