Skip to content

Add submit --down to submit only up to a branch - #39

Merged
DomBlack merged 2 commits into
DomBlack:mainfrom
StillAyo:submit-up-to-branch
Oct 15, 2026
Merged

DomBlack merged 2 commits into
DomBlack:mainfrom
StillAyo:submit-up-to-branch

Conversation

@StillAyo

@StillAyo StillAyo commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Add --down to git stack submit to push part of a stack, i.e. the current branch and everything below it. This leaves the above branches alone, the way gt submit does.

This allows for the bottom of a stack to be sent for review while the top is still being worked on.

Existing state

  • submit always submitted the whole stack, because gh stack submit has no way to scope it and always pushes every branch.

Change

  • git stack submit --down submits the current branch and every branch below it. git stack submit <branch> does the same up to the named branch.
  • Plain submit / git ss: unchanged, through gh stack submit. So is --down from the top of the stack.
  • Part of a stack: submit does the work itself:
    • pushes those branches in one atomic git push, each with --force-with-lease against its remote tracking tip (new git.Client.Push);
    • creates missing PRs through the forge, using supplied or --ai text, otherwise a single commit's subject and body, the same way gh stack fills them in;
    • runs gh stack link with the PR numbers so they join the stack on GitHub (new Submitter.Link).
  • MCP: stack_submit gets down and branch inputs.
  • README, docs/architecture.md and docs/mcp.md are updated.

Push force pushes a set of branches in one atomic git push, each with
--force-with-lease against the remote tip the caller expects, so a remote
that moved since the last fetch refuses the whole push.
Copilot AI balanced review requested due to automatic review settings October 15, 2026 13:01

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Comment thread pkg/gitconfig/aliases.go Outdated
{"ab", "stack absorb"},
{"rs", "stack restack"},
{"ss", "stack submit"},
{"ss", "stack ss"},

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could this alias not just be stack submit --stack ?

Copilot AI balanced review requested due to automatic review settings October 15, 2026 13:14
@StillAyo
StillAyo force-pushed the submit-up-to-branch branch from 2146636 to 0c7b535 Compare October 15, 2026 13:14
@StillAyo StillAyo changed the title Submit up to a branch; ss submits the whole stack Submit up to a branch Oct 15, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

git stack submit --down pushes the current branch and every branch below
it, and leaves the ones above alone, so the bottom of a stack can go for
review while the top is still moving. Naming a branch does the same up to
that branch. A plain submit still pushes the whole stack.

gh stack submit always pushes every branch, so the whole stack still goes
through it. With --down and branches above, submit pushes those branches
itself in one atomic, leased git push, creates their missing PRs through
the forge, and runs gh stack link with the PR numbers so they join the
stack on GitHub without pushing anything else. gh stack's editor only
exists inside its submit, so new PRs there take their titles from their
commits unless --ai or supplied texts say otherwise.

stack_submit gets matching down and branch inputs.
Copilot AI balanced review requested due to automatic review settings October 15, 2026 13:19
@StillAyo
StillAyo force-pushed the submit-up-to-branch branch from 0c7b535 to e1a71bb Compare October 15, 2026 13:19
@StillAyo StillAyo changed the title Submit up to a branch Add submit --down to submit only up to a branch Oct 15, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@DomBlack
DomBlack enabled auto-merge (rebase) October 15, 2026 13:27
@DomBlack
DomBlack merged commit c8d53e1 into DomBlack:main Oct 15, 2026
5 checks 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.

3 participants