From: Christian Couder Date: Thu, 25 Jun 2026 13:51:56 GMT Subject: Re: [PATCH v6 10/10] builtin/history: implement "drop" subcommand Message-ID: In-Reply-To: <20260615-b4-pks-history-drop-v6-10-2e329e536d78@pks.im> On Mon, Jun 15, 2026 at 3:55 PM Patrick Steinhardt 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.