land: stale remote-tracking ref makes force-with-lease refuse a reused branch name #21

Open
opened 2026-07-19 15:37:46 +00:00 by PerishFire · 0 comments
Owner

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.

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/<name>), 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/<branch>:refs/remotes/origin/<branch> tolerating absence, or derive the lease expectation from a fresh ls-remote) so a reused branch name cannot inherit a dead lease.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
PerishLab/harness#21
No description provided.