Git development
 help / color / mirror / Atom feed
From: Luca Stefani <luca.stefani.ge1@gmail.com>
To: Justin Tobler <jltobler@gmail.com>, Jeff King <peff@peff.net>
Cc: git@vger.kernel.org, cat@malon.dev
Subject: Re: [PATCH] object-file: don't use object database without a repository
Date: Mon, 6 Apr 2026 21:31:39 +0200	[thread overview]
Message-ID: <568cb40a-373e-4ad1-a6a0-fb7289da92e2@gmail.com> (raw)
In-Reply-To: <adP0hnV7Gl08qqqf@denethor>


On 06/04/2026 20:17, Justin Tobler wrote:
> On 26/04/05 03:17PM, Jeff King wrote:
>> But I think the actual code change in your patch is the wrong thing, so
>> I also don't think we'd want to just squash that test in. I'm hoping
>> Justin has some insights on how to do a more complete fix.
> I agree with Peff here that the correct fix should continue to use the
> object streaming mechanisms. To avoid this segfault, we really should
> avoid using ODB transactions when there isn't an ODB in the first place.
>
> I replied in another thread[1] with how we could go about fixing. To
> summarize, it just so happens that I already have a patch[2] out on the
> list that appears to resolve this issue.

Thanks, just verified it works as expected.

>
> For the use case here, git-diff(1) is only interested in generating the
> hash for the "large" blobs and not actually writing anything to the ODB.
> This patch introduces a separate "hash-only" variant of
> `index_blob_packfile_transaction()` and is used to bypass creating an
> ODB transaction when object writes are not needed.
>
> If this is the route we want to go down, I can extract this patch from
> the current series and send it as a separate fix. :)
If this ends up happening CC me and I'll gladly stamp it with Tested-by :)
>
> -Justin
>
> [1]: https://lore.kernel.org/git/adPjXKGIT5O7SK6E@denethor/T/#m9cee420941b66abfb0244ea4b7762ba8d0ff7b52
> [2]: https://lore.kernel.org/git/20260402213220.2651523-5-jltobler@gmail.com/

  reply	other threads:[~2026-04-06 19:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-04 17:28 [PATCH] object-file: don't use object database without a repository Luca Stefani
2026-04-05  6:03 ` Pushkar Singh
2026-04-05  6:46 ` Jeff King
2026-04-05 16:10   ` Luca Stefani
2026-04-05 19:17     ` Jeff King
2026-04-06 18:17       ` Justin Tobler
2026-04-06 19:31         ` Luca Stefani [this message]
2026-04-06 20:31           ` Justin Tobler
2026-04-06 20:06         ` Jeff King
2026-04-06 20:38           ` Justin Tobler

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=568cb40a-373e-4ad1-a6a0-fb7289da92e2@gmail.com \
    --to=luca.stefani.ge1@gmail.com \
    --cc=cat@malon.dev \
    --cc=git@vger.kernel.org \
    --cc=jltobler@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox