Re: [PATCH 1/2] merge-ours: drop USE_THE_REPOSITORY_VARIABLE
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 6, 2026, 17:33 UTC
- Message-ID
- <xmqqy0l5g4kw.fsf@gitster.g>
- In-Reply-To
- <aYYCesJsZMdHu1Ia@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 9 quoted lines
>> - struct repository *repo UNUSED)
>> + struct repository *repo)
>> {
>> show_usage_if_asked(argc, argv, builtin_merge_ours_usage);
>
> One important part of the puzzle here is that git-merge-ours(1) cannot
> run outside of a repository, as it is tagged with `RUN_SETUP`. So as a
> consequence, `repo` will never be `NULL`, and thus all the changes to
> s/the_repository/repo/ are safe.Indeed. It may be worth recording that reasoning in the log message.