Skip to content

fix(state): share stack state across linked worktrees - #38

Merged
wsehl merged 1 commit into
bstack/wsehl/3391cd2e52e9467992daf2f87ce46496from
bstack/wsehl/22d9d0b07a8c45ec931e2d4be2ffc930
Sep 29, 2026
Merged

wsehl merged 1 commit into
bstack/wsehl/3391cd2e52e9467992daf2f87ce46496from
bstack/wsehl/22d9d0b07a8c45ec931e2d4be2ffc930

Conversation

@wsehl

@wsehl wsehl commented Sep 29, 2026

Copy link
Copy Markdown
Owner

git rev-parse --git-path bstack/state.json resolves to a private
directory per linked worktree (.git/worktrees/<name>/), so syncing the
same stack from another worktree started with no memory of it: dropped
PRs were never closed and already-stacked PRs were linked again.

State now lives under --git-common-dir, which is the same path as
before for the main worktree.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 (1M context) noreply@anthropic.com

`git rev-parse --git-path bstack/state.json` resolves to a private
directory per linked worktree (`.git/worktrees/<name>/`), so syncing the
same stack from another worktree started with no memory of it: dropped
PRs were never closed and already-stacked PRs were linked again.

State now lives under `--git-common-dir`, which is the same path as
before for the main worktree.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
bstack-id: 22d9d0b07a8c45ec931e2d4be2ffc930
@wsehl
wsehl added this pull request to stack #43 September 29, 2026 10:33
@wsehl
wsehl merged commit 7df2b60 into main Sep 29, 2026
1 check passed
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.

1 participant