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

Re: [PATCH] userdiff: skip textconv caching when not in a repository

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 26, 2024, 16:35 UTC
Message-ID
<xmqqle77dvzj.fsf@gitster.g>
In-Reply-To
<20240226102729.GB2685773@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 11 quoted lines
> Subject: userdiff: skip textconv caching when not in a repository
>
> The textconv caching system uses git-notes to store its cache entries.
> But if you're using "diff --no-index" outside of a repository, then
> obviously that isn't going to work.
>
> Since caching is just an optimization, it's OK for us to skip it.
> However, the current behavior is much worse: we call notes_cache_init()
> which tries to look up the ref, and the low-level ref code hits a BUG(),
> killing the program. Instead, we should notice before setting up the
> cache that it there's no repository, and just silently skip it.
Makes sense.
Will queue.  Thanks.
Previous: Jeff King
Message 5 of 5 in “Bug: diff --no-index with cachetextconv crashes”
  1. Paweł DominiakFeb 26, 2024
  2. Jeff KingFeb 26, 2024
  3. Paweł DominiakFeb 26, 2024
  4. userdiff: skip textconv caching when not in a repositoryJeff King, Feb 26, 2024
  5. Junio C HamanoFeb 26, 2024

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.