land: stale remote-tracking ref makes force-with-lease refuse a reused branch name #21
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
land pushes with --force-with-lease, but when the local clone carries a STALE remote-tracking ref
for the topic branch name (left by a long-dead branch of the same name; branch -D removes the
local branch, nothing prunes refs/remotes/origin/), the lease expects that old state,
the remote branch no longer exists, and the push dies with 'stale info'.
Reproduced 2026-07-19: reusing branch name harness-stable (last used in the 0.1.0 promotion)
failed the push in negentropy, runseal, and open-web; sidecar (fresh remote, no remnant) passed.
Workaround applied: git remote prune origin + update-ref -d, then re-land.
Candidate fix in the land engine: before push, refresh or drop the topic branch's remote-tracking
ref (fetch origin +refs/heads/:refs/remotes/origin/ tolerating absence, or derive
the lease expectation from a fresh ls-remote) so a reused branch name cannot inherit a dead lease.