From: Jeff King <peff@peff.net>
To: Stefan Beller <sbeller@google.com>
Cc: "Junio C Hamano" <gitster@pobox.com>,
"Jan Keromnes" <janx@linux.com>,
"Erik Elfström" <erik.elfstrom@gmail.com>,
"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Git 2.8.1 fails test 32 of t7300-clean.sh, breaks profile build
Date: Tue, 3 May 2016 15:00:53 -0400 [thread overview]
Message-ID: <20160503190053.GC30530@sigill.intra.peff.net> (raw)
In-Reply-To: <CAGZ79kYxSCsXGLBoBTAOLfe_pOu7YNBQoccs_fA0btEzpnU=-w@mail.gmail.com>
On Tue, May 03, 2016 at 11:53:36AM -0700, Stefan Beller wrote:
> > is related or worth doing on top. But I don't think so. That code is
> > just trying to convert some error-cases into "let's err on the side of
> > assuming it is a repo". Doing that for all values of gitfile_error is
> > definitely the wrong thing (it would treat a totally non-existent
> > ".git" file as "yes, it's there", which is clearly bogus).
>
> The proposed change is overly eager indeed.
> What if we get back a READ_GITFILE_ERR_STAT_FAILED ?
> I would think that is a reasonable indicator of a submodule being there?
> (The stat failure may be transient ENOMEM Out of memory (i.e., kernel memory).)
That would certainly be wrong with read_gitfile_gently() as it is today;
it does not distinguish various values of errno for stat(), so that
would get the "there's not even a .git file here at all" case wrong.
So the first step would be to have read_gitfile_gently() start looking
for ENOENT versus other errors. I don't know if that's worth the
trouble; we're pretty cavalier about treating stat failure as "file does
not exist" in the rest of the code.
-Peff
next prev parent reply other threads:[~2016-05-03 19:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAA6PgK7b=ithSYREV5axaE3fmRG5Vp06UtWiZXD-aJuZKfEVYA@mail.gmail.com>
2016-04-29 12:53 ` Fwd: Git 2.8.1 fails test 32 of t7300-clean.sh, breaks profile build Jan Keromnes
2016-04-29 12:58 ` Johannes Schindelin
2016-04-29 17:06 ` Stefan Beller
2016-05-03 9:19 ` Jan Keromnes
2016-05-03 18:02 ` Stefan Beller
2016-05-03 18:05 ` Junio C Hamano
2016-05-03 18:48 ` Jeff King
2016-05-03 18:53 ` Stefan Beller
2016-05-03 19:00 ` Jeff King [this message]
2016-05-03 21:28 ` erik elfström
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=20160503190053.GC30530@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=erik.elfstrom@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=janx@linux.com \
--cc=sbeller@google.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).