All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Justin Tobler <jltobler@gmail.com>
Cc: Jeff King <peff@peff.net>,  Tian Yuchen <cat@malon.dev>,
	 Luca Stefani <luca.stefani.ge1@gmail.com>,
	 git@vger.kernel.org
Subject: Re: [BUG] git diff --no-index segfaults on large files (NULL object database)
Date: Mon, 06 Apr 2026 13:45:15 -0700	[thread overview]
Message-ID: <xmqqjyujakdg.fsf@gitster.g> (raw)
In-Reply-To: <adPjXKGIT5O7SK6E@denethor> (Justin Tobler's message of "Mon, 6 Apr 2026 12:57:07 -0500")

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.

> 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.

      reply	other threads:[~2026-04-06 20:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-04 10:39 [BUG] git diff --no-index segfaults on large files (NULL object database) Luca Stefani
2026-04-04 16:45 ` Tian Yuchen
2026-04-04 16:53   ` Luca Stefani
2026-04-04 17:07     ` Tian Yuchen
2026-04-04 23:09       ` Jeff King
2026-04-05  2:48         ` Tian Yuchen
2026-04-05  6:14           ` Jeff King
2026-04-06 17:57         ` Justin Tobler
2026-04-06 20:45           ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqjyujakdg.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=cat@malon.dev \
    --cc=git@vger.kernel.org \
    --cc=jltobler@gmail.com \
    --cc=luca.stefani.ge1@gmail.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.