git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: "SZEDER Gábor" <szeder.dev@gmail.com>
Cc: Andrew Baumann <Andrew.Baumann@microsoft.com>, git@vger.kernel.org
Subject: Re: [PATCH] setup.c: don't try to access '//HEAD' during repo discovery
Date: Fri, 3 Nov 2017 13:36:45 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.21.1.1711031334000.6482@virtualbox> (raw)
In-Reply-To: <20171103010645.25499-1-szeder.dev@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1039 bytes --]

Hi Gábor,

On Fri, 3 Nov 2017, SZEDER Gábor wrote:

> Commit ce9b8aab5 (setup_git_directory_1(): avoid changing global state,
> 2017-03-13) changed how the git directory is discovered, and as a side
> effect when the discovery reaches the root directory Git tries to
> access paths like '//HEAD' and '//objects'.  This 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.
> 
> Special case the root directory in is_git_directory() to prevent
> accessing paths with leading double slashes.

I would rather not special-case the (Unix) root directory. The underlying
problem, as Peff pointed out, is that an extra slash is appended if the
directory. And as `is_git_directory()` is not marked as static, we must
assume that there are other callers that may pass in directory paths
ending in a slash already.

Ciao,
Dscho

      reply	other threads:[~2017-11-03 12:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.21.1.1711031334000.6482@virtualbox \
    --to=johannes.schindelin@gmx.de \
    --cc=Andrew.Baumann@microsoft.com \
    --cc=git@vger.kernel.org \
    --cc=szeder.dev@gmail.com \
    /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.
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 NNTP newsgroup(s).