~ knotless Search/
↑↓ move↵ open⇧↵ all results

chadtmiller.com/knotless

git that lives in your Atmosphere account

knotless.dev
1 collaborator

knotless 0.13.0 Latest 2 packages, 1 image

1
10

A retarget that fails on its head still moves the pull's base

Closed
Closed chadtmiller.com opened this issue 0 comments
kind/bugarea/cli

What happened

forge::retarget (crates/knotless/src/forge.rs, retarget, about line 1947) writes the base state record first, then handles head. The head part can still fail: when the caller did not write the pull (only the author of <pull> can change its head), or when the head branch is missing (<url> has no branch <head>). The call then returns an error, but the new base is already written and stays.

How to see it

As a collaborator who did not write a pull, run knotless retarget <url> <pull> --base <other> --head <branch>. MCP retarget_pull does the same. The command fails, yet the pull now points at the new base. The same thing happens to the author when the head branch name is a typo.

What you expected

Either both parts land or neither does. Check the head, meaning authorship and that the branch exists, before writing the base state.

Where

Code on main at b191acef. Found by the docs audit.

🤖 Generated with Claude Code