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.