Skip to content

v1.21.4 — merge from a linked worktree lands through a temporary one (#27) - #28

Merged
sshlg merged 2 commits into
mainfrom
fix/merge-from-worktree
Oct 3, 2026
Merged

sshlg merged 2 commits into
mainfrom
fix/merge-from-worktree

Conversation

@sshlg

@sshlg sshlg commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Fixes #27.

From a linked worktree, merge used to fail with could not check out main whenever another worktree held the integration branch. It now handles that case:

  • Without --push: it refuses up front, touches nothing, and says why.
  • With --push: the merge, the merge-log entry and the push happen in a temporary detached worktree, which is removed on every path. The holder's files and its ref are never touched.
  • The holder's branch stays put. The fast-forward update-ref is skipped when another worktree has the branch checked out.
  • Push before release. On both paths the push now happens first. If the push is rejected, the command fails and every lease stays held.

New check: check_merge_from_a_linked_worktree. Two mutations were caught:

  • dropping the holder detection reproduces could not check out main;
  • ignoring the push result is reported.

npm test:

  • PASS: agent-sync v1.21.4 — all checks green
  • SELF-TEST PASS (74 fixtures)
  • claim cell 27, hooks 13, installer 11

Version 1.21.4 across the manifests, SKILL.md, the card, CHANGELOG and docs/evidence/verification.md.

🤖 Generated with Claude Code

Робот and others added 2 commits October 3, 2026 19:25
…27)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@sshlg
sshlg merged commit 169436a into main Oct 3, 2026
2 checks passed
@sshlg
sshlg deleted the fix/merge-from-worktree branch October 3, 2026 19:23
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.

merge from a linked worktree fails: could not check out main

1 participant