Github stack does not persist across worktrees
- Vorherrschende Sprache
- Go
- Sterne
- 1.5k
- Forks
- 70
- Ø Merge
- 1 T. 8 Std.
- Gemergte PRs (30 T.)
- 7
Beschreibung
When opening a branch in a worktree and running `gh stack init`, it does not keep track of the stack locally. `gh-stack` keeps stack membership in local state tied to the checkout where `init` ran. If I create a worktree & use `gh-stack`, the stack doesn't persist on my machine, even if I open the branch back in my main worktree. Inside a worktree, $GIT_DIR is .git/worktrees// — so `worktree remove` deletes the stack state with it
This is confusing & not obvious. Additionally, a modern LLM workflow may involve different sub-agents in different worktrees. This makes gh-stack worse than, say git-spice for this purpose, since I can't easily update my work if I checkout the branch on my main worktree.
The stack _is_ stored remotely on Github, but THAT doesn't always work - seems like GitHub only records a stack for a chain of two or more PRs.
Beitragsleitfaden
Rechercherichtung
Beginne beim Einstiegspunkt `gh stack init` und verfolge, wie die lokale Stack-Zugehörigkeit gespeichert wird, wenn `$GIT_DIR` auf `.git/worktrees//` zeigt. Reproduziere das Verhalten über einen Hauptarbeitsbaum und einen verknüpften Arbeitsbaum hinweg, einschließlich `worktree remove`; fertig ist es, wenn die Stack-Zugehörigkeit verfügbar bleibt, wenn der Branch aus einem anderen Arbeitsbaum geöffnet wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- git, github, go
- Bereich
- cli, tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Aktiv
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 52/100