Re: [PATCH v6 10/10] builtin/history: implement "drop" subcommand
- From
Christian Couder <christian.couder@gmail.com>
- Date
- Jun 25, 2026, 13:51 UTC
- Message-ID
- <CAP8UFD3jsepRaiHDen_CzWcse-atvBfCdzAQovk+1csaQeDxmQ@mail.gmail.com>
- In-Reply-To
- <20260615-b4-pks-history-drop-v6-10-2e329e536d78@pks.im>
On Mon, Jun 15, 2026 at 3:55 PM Patrick Steinhardt <ps@pks.im> wrote:
Show 10 quoted lines
> + /*
> + * 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.