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

Re: [BUG] git diff --no-index segfaults on large files (NULL object database)

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 6, 2026, 20:45 UTC
Message-ID
<xmqqjyujakdg.fsf@gitster.g>
In-Reply-To
<adPjXKGIT5O7SK6E@denethor>
Justin Tobler <jltobler@gmail.com> writes:
> IMO it is already questionable as to why we would want to start an ODB
> transaction if it is already known that the object won't be written.
> IOW, if we are only interested in streaming the object to get its hash
> we shouldn't have to start a transaction.
Very well.
Show 6 quoted lines
> The other option would be as Peff suggested and to make
> `odb_transaction_begin()` just return early with NULL or some type of
> no-op transaction if there is no ODB set up. I do think the former
> approach would be preferable though as I'm not sure there is really a
> good use case for supporting ODB transactions when there isn't an ODB
> set up.

Let's not go there. I agree that odb transactions without odb does not make any sense.

Previous: Justin Tobler
Message 9 of 9 in “[BUG] git diff --no-index segfaults on large files (NULL object database)”
  1. Luca StefaniApr 4, 2026
  2. Tian YuchenApr 4, 2026
  3. Luca StefaniApr 4, 2026
  4. Tian YuchenApr 4, 2026
  5. Jeff KingApr 4, 2026
  6. Tian YuchenApr 5, 2026
  7. Jeff KingApr 5, 2026
  8. Justin ToblerApr 6, 2026
  9. Junio C HamanoApr 6, 2026

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.