From: "René Scharfe" <l.s.r@web.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: Git List <git@vger.kernel.org>
Subject: Re: [PATCH] xdiff-interface: stop using the_repository
Date: Mon, 9 Feb 2026 20:24:51 +0100 [thread overview]
Message-ID: <267102b2-3ec1-4508-bf90-ccc69516669c@web.de> (raw)
In-Reply-To: <xmqqbjhx6cb5.fsf@gitster.g>
On 2/9/26 6:45 PM, Junio C Hamano wrote:
> René Scharfe <l.s.r@web.de> writes:
>
>>>> - ptr->ptr = odb_read_object(the_repository->objects, oid, &type, &size);
>>>> + ptr->ptr = odb_read_object(odb, oid, &type, &size);
>>>> if (!ptr->ptr || type != OBJ_BLOB)
>>>> die("unable to read blob object %s", oid_to_hex(oid));
>>>> ptr->size = size;
>>
>> My initial version did that. Then I realized that read_mmblob() is just
>> a thin odb_read_object() wrapper that converts null_oid to
>> empty_blob_oid and dies on non-blobs, though, so requiring a full repo
>> pointer seemed excessive. And all callers also use other odb_*
>> functions already.
>
> Absolutely. Passing the narrowest thing the callee needs is the
> right approach and that is what is done in the version posted.
>
> Thanks. I presume that a small and final reroll is expected, if
> only to remove the now unnecessary #include, if not splitting it
> into three parts?
Right, and still keeping it all in one patch, now that it has become
slightly shorter. :)
René
next prev parent reply other threads:[~2026-02-09 19:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-08 13:47 [PATCH] xdiff-interface: stop using the_repository René Scharfe
2026-02-09 9:48 ` Patrick Steinhardt
2026-02-09 14:14 ` René Scharfe
2026-02-09 11:15 ` Junio C Hamano
2026-02-09 15:21 ` René Scharfe
2026-02-09 17:45 ` Junio C Hamano
2026-02-09 19:24 ` René Scharfe [this message]
2026-02-09 18:57 ` Elijah Newren
2026-02-09 20:01 ` Junio C Hamano
2026-02-15 18:42 ` René Scharfe
2026-02-15 18:42 ` René Scharfe
2026-02-09 19:24 ` [PATCH v2] " René Scharfe
2026-02-10 13:28 ` Patrick Steinhardt
2026-02-10 21:31 ` Junio C Hamano
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=267102b2-3ec1-4508-bf90-ccc69516669c@web.de \
--to=l.s.r@web.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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