Re: Git 2.8.1 fails test 32 of t7300-clean.sh, breaks profile build
- From
Jeff King <peff@peff.net>
- Date
- May 3, 2016, 19:00 UTC
- Message-ID
- <20160503190053.GC30530@sigill.intra.peff.net>
- In-Reply-To
- <CAGZ79kYxSCsXGLBoBTAOLfe_pOu7YNBQoccs_fA0btEzpnU=-w@mail.gmail.com>
On Tue, May 03, 2016 at 11:53:36AM -0700, Stefan Beller wrote:
Show 10 quoted lines
> > 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