Thread (119 messages) 119 messages, 6 authors, 3d ago

Re: [PATCH v6 10/10] builtin/history: implement "drop" subcommand

From: Junio C Hamano <hidden>
Date: 2026-06-25 20:50:45

Christian Couder [off-list ref] writes:
On Mon, Jun 15, 2026 at 3:55 PM Patrick Steinhardt [off-list ref] wrote:
quoted
+       /*
+        * 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help