8000 feat(resolve): open a session on the conflict that stopped a rebase by dominikwozniak · Pull Request #41 · dominikwozniak/dw-mc · GitHub
[go: up one dir, main page]

Skip to content

feat(resolve): open a session on the conflict that stopped a rebase - #41

Merged
dominikwozniak merged 3 commits into
mainfrom
feat/38-resolve-session
Sep 17, 2026
Merged

dominikwozniak merged 3 commits into
mainfrom
feat/38-resolve-session

Conversation

@dominikwozniak
Copy link
Copy Markdown
Owner

dw-mc resolve <pr> puts a recorded conflict on the table: a worktree of my own on dw-mc/rebase/<number> that tracks the pull request's branch and stands after the session, the rebase redone there and left stopped where it stops, the unmerged files on screen, and an interactive session carrying them and what the pull request is for. The tool resolves nothing; finishing the rebase, committing and pushing are mine, which is why the worktree outlives the session.

dw-mc rebase still aborts and still leaves no partial state. That invariant is about the throwaway worktree a rebase cuts; this worktree is one I asked for, so a rebase in progress in it is the point.

rebase.enabled does not gate this, because nothing here writes to GitHub (ADR 0002). What it refuses is a pull request I did not author, one from a fork, one in a stack, and one with no conflict at the head it is now at, which goes to dw-mc rebase instead. The branch guards are the ones a rebase already read, now in one place both commands ask and worded for both.

flowchart LR
  A[dw-mc resolve] --> B{guards}
  B -->|refused| C[one sentence, nothing cut]
  B -->|passed| D[worktree on dw-mc/rebase/N]
  D --> E[git rebase base]
  E -->|conflict| F[paths on screen, session opens]
  E -->|replayed by rerere| G[nothing to resolve]
  F --> H[I continue the rebase and push]
Loading

rerere, and what it cost

rerere is on in the tool's clone, so a conflict resolved once is one git answers by itself. Verified against git 2.55: that replay stages the old resolution and still exits non-zero, with nothing left unmerged — git never continues a rebase on its own. Turning the key on and stopping there would have made dw-mc rebase abort over its own recorded resolution and push nothing.

So one replay now serves both worktrees and reads a stop three ways: unmerged files are a conflict, a staged stop with a rebase in flight is continued, and anything else is git's own failure. The only difference between the two callers is whether a conflict aborts.

Closes #38

🤖 Generated with Claude Code

dominikwozniak and others added 3 commits September 17, 2026 10:12
dw-mc resolve <pr> puts the recorded conflict on the table: a worktree of
my own on dw-mc/rebase/<number>, the rebase redone there and left stopped
where it stops, the unmerged files on screen, and an interactive session
carrying them and what the pull request is for. The tool resolves nothing;
finishing the rebase, committing and pushing are mine, which is why the
worktree outlives the session.

dw-mc rebase is untouched: it still aborts and still leaves no partial
state. The invariant is about the throwaway worktree a rebase cuts, and
this worktree is one I asked for.

rebase.enabled does not gate this, because nothing here writes to GitHub.
What it does refuse is a pull request I did not author, one from a fork,
one in a stack, and one with no conflict at the head it is now at, which
goes to dw-mc rebase instead. The branch guards are the ones a rebase
already reads, now in one place both commands ask.

rerere is turned on in the tool's clone, so a conflict I resolve once is
one git replays by itself on the next rebase.

Closes #38

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Verified against git 2.55: a replay of a conflict resolved once stages the
old resolution and still exits non-zero, with nothing left unmerged. Turning
rerere on without handling that would have made dw-mc rebase abort over its
own recorded resolution and push nothing, and dw-mc resolve report git's
error instead of a finished replay.

One replay now serves both worktrees, with an abort policy for the only
thing that differs between them. A stop is a conflict where files are
unmerged, a replay to continue where rerere staged one, and git's own
failure where it is neither.

The branch guards both commands share say nothing about pushing any more,
because resolve pushes nothing. The session a launcher opens is named for
what it is, now that a conflict opens one too.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The step after a resolve session is mine, and it was a sentence to read
rather than something to run. It is now the lines themselves - the worktree
to be in, the rebase to continue, the push - so finishing is a paste. A
replay that went through prints the two it needs instead.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@dominikwozniak
dominikwozniak merged commit 298b261 into main Sep 17, 2026
1 check passed
@dominikwozniak
dominikwozniak deleted the feat/38-resolve-session branch September 17, 2026 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dw-mc resolve <pr>: a session on a rebase conflict

1 participant

0