Re: [PATCH] xdiff-interface: stop using the_repository
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 9, 2026, 20:01 UTC
- Message-ID
- <xmqq8qd14rfs.fsf@gitster.g>
- In-Reply-To
- <CABPp-BFuwvqiCTCCpoyT6em9_1-qrgPWHWhrufQ3UuZ+Kfkb6A@mail.gmail.com>
Elijah Newren <newren@gmail.com> writes:
Show 23 quoted lines
> On Sun, Feb 8, 2026 at 5:47 AM René Scharfe <l.s.r@web.de> wrote:
>>
> ...
>> diff --git a/merge-ort.c b/merge-ort.c
>> index e80e4f735a..a4103d56ed 100644
>> --- a/merge-ort.c
>> +++ b/merge-ort.c
>> @@ -2136,9 +2136,9 @@ static int merge_3way(struct merge_options *opt,
>> name2 = mkpathdup("%s:%s", opt->branch2, pathnames[2]);
>> }
>>
>> - read_mmblob(&orig, o);
>> - read_mmblob(&src1, a);
>> - read_mmblob(&src2, b);
>> + read_mmblob(&orig, the_repository->objects, o);
>> + read_mmblob(&src1, the_repository->objects, a);
>> + read_mmblob(&src2, the_repository->objects, b);
>>
>> merge_status = ll_merge(result_buf, path, &orig, base,
>> &src1, name1, &src2, name2,
>
> A minor point, but could we use opt->repo instead of the_repository in
> merge-ort?Great. If we have already an appropriate structure with the relevant data, using it is the most welcome.
> So, if you want to go ahead with this and then I submit a later patch > that cleans them all up, that's fine too.
True too, but as long as it is so obvious that "opt" here has .repo member that we can use, I do not see a reason not to.
Thanks.