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

Re: git name-rev looks at refs/notes, refs/svn/map: stack overflow

From
Jeff King <peff@peff.net>
Date
Nov 11, 2019, 04:21 UTC
Message-ID
<20191111042149.GE6379@sigill.intra.peff.net>
In-Reply-To
<CAE7Eq9jJzftkP9JWFpstS96SiCd+jO_adSQ-HruyYYNi3gWe7w@mail.gmail.com>
On Sat, Nov 09, 2019 at 12:31:31PM +0100, Sebastiaan Dammann wrote:
Show 5 quoted lines
> The destructive workaround at the moment is to delete the refs, then
> run an aggressive gc:
> git update-ref -d refs/notes/commits
> git update-ref -d refs/svn/map
> git gc --prune=all --aggressive

If the issue is just traversing from those refs, you shouldn't need to do a "gc". In fact, you should be able to use the "--refs" option to name-rev to avoid them without deleting them.

All of that's obviously a workaround, though. The real issue is the stack exhaustion.

> I hope to hear your view on this. Is this an (confirmed) issue with
> git? Are there beside the workaround I mentioned, any other
> workarounds?

Yes, this is well known. It's covered in the test suite (unfortunately still failing, of course) since 31625b34c0 (t6120: test describe and name-rev with deep repos, 2017-09-07).

There was a proposed fix recently in:
  https://public-inbox.org/git/20190919214712.7348-1-szeder.dev@gmail.com/

but it doesn't seem to have been picked up. I'm not sure what the current status is.

-Peff
Previous: Sebastiaan DammannNext: SZEDER Gábor
Message 2 of 4 in “git name-rev looks at refs/notes, refs/svn/map: stack overflow”
  1. Sebastiaan DammannNov 9, 2019
  2. Jeff KingNov 11, 2019
  3. SZEDER GáborNov 11, 2019
  4. Sebastiaan DammannNov 12, 2019

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.