Re: [PATCH v6 10/10] builtin/history: implement "drop" subcommand
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 25, 2026, 20:50 UTC
- Message-ID
- <xmqqo6gye44d.fsf@gitster.g>
- In-Reply-To
- <CAP8UFD3jsepRaiHDen_CzWcse-atvBfCdzAQovk+1csaQeDxmQ@mail.gmail.com>
Christian Couder <christian.couder@gmail.com> writes:
Show 21 quoted lines
> On Mon, Jun 15, 2026 at 3:55 PM Patrick Steinhardt <ps@pks.im> wrote:
>
>> + /*
>> + * If HEAD will move as a result of the rewrite then we'll have to
>> + * merge in the changes into the worktree and index. This merge can of
>> + * course conflict, which will cause the whole operation to abort.
>> + *
>> + * If we had already updated the refs at that point then we'd have an
>> + * inconsistent repository state. So we first perform a dry-run merge
>> + * here before updating refs.
>> + */
>> + if (!is_bare_repository()) {
>
> When your ps/setup-drop-global-state series is merged, this will look like:
>
> if (!is_bare_repository(repo)) {
>
> which is nicer.
>
> So except for perhaps the replay_result_queue_update() duplication,
> the series looks great to me.Thanks. Let me mark it as "Waiting for response(s) to review comment(s)." then.