feat: add st track, create, log, up, down and stack-wide submit#40
Merged
feat: add st track, create, log, up, down and stack-wide submit#40
Conversation
Add explicit branch tracking via git config (staqd-parent), replacing implicit merge-base detection for stack PR creation. st submit now walks the tracked chain root→leaf to create PRs for the entire stack. New commands: track, untrack, create, log, up, down. Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com mailto:noreply@anthropic.com
• Replace direct execFileSync in create.mjs with git.checkoutNew helper • Use regex capture group for branch name extraction in listTrackedBranches to handle branch names containing dots correctly Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com mailto:noreply@anthropic.com
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
st track/st untrackfor explicit branch tracking via git config (branch.<name>.staqd-parent)st createfor branch creation with auto-trackingst logfor tracked stack tree visualizationst up/st downfor stack navigationst submitto create PRs for the entire tracked chain (root → leaf), not just the current branchcli/git.mjs(getTrackedParent,setTrackedParent,unsetTrackedParent,listTrackedBranches)Motivation
Previously
st submitonly created a PR for the current branch. With stacked workflows (main → a → b → c), users had to runst submiton each branch individually. Now,st trackregisters the parent relationship in git config, andst submitwalks the chain to create all missing PRs at once — similar to Graphite'sgt track+gt submit.New Commands
st track--parent)st track --listst untrackst create <name>st logst upst downDesign Decisions
branch.<name>.staqd-parent): Same approach as Graphite. No external DB, survives branch operations, portable.st submitwithout any tracked branches falls back to the existingdetectBasebehavior.Test plan
st track --parent=mainon a branch → verify git config setst track --listshows tracked branchesst untrackremoves trackingst logshows tree with current branch highlightedst create <name>creates branch and auto-tracksst up/st downnavigate the stackst submit --dry-runon a tracked stack shows PRs to create for entire chainst submitcreates PRs for all unsubmitted branches in chainst submitfalls back to existing behaviorGenerated with Claude Code