git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Stefan BellerNext: erik elfström
Message 9 of 10 in “Fwd: Git 2.8.1 fails test 32 of t7300-clean.sh, breaks profile build”
  1. Jan KeromnesApr 29, 2016
  2. Johannes SchindelinApr 29, 2016
  3. Stefan BellerApr 29, 2016
  4. Jan KeromnesMay 3, 2016
  5. Stefan BellerMay 3, 2016
  6. Junio C HamanoMay 3, 2016
  7. Jeff KingMay 3, 2016
  8. Stefan BellerMay 3, 2016
  9. Jeff KingMay 3, 2016
  10. erik elfströmMay 3, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.