You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat: batch push branches
This changes the behavior of `gh stack submit` so that it pushes all branches at once, atomically.
This improves performance.
* docs(git): clarify Push doc comment
The Push doc comment said "force-pushes ... with lease" but the function
takes a `force` flag and only adds `--force-with-lease` when true. Update
the comment to describe both branches honestly.
Per PR #125 review.
* fix(git): guard PushMany against dash-prefixed branch names
Insert a `--` end-of-options marker between the flag list and the refspec
list so a branch starting with `-` is never parsed as a git option.
Per PR #125 review.
* style(submit): format branch names in push summary line
Other submit output ("Skipping push for ...") formats branch names via
`s.Branch(...)`; the batched push summary should do the same so colors and
emphasis stay consistent across the phase.
Per PR #125 review.
* fix(submit): include refs in batched push error message
The previous `push failed: %w` wrapping dropped the list of branches being
pushed, making failures harder to diagnose at a glance. Include the
branch names alongside git's underlying error.
Per PR #125 review.
* docs(git): correct setupRepoWithRemote return-value comment
Helper returns four values (localDir, remoteDir, *Git, trunk) but the
comment only listed three. Sync the comment with the signature.
Per PR #125 review.
* test(git): drop dead pre-divergence block in atomic-rejection test
The first block wrote a file into the bare remote and ran `update-ref ...
HEAD` with all errors ignored. It did nothing useful — the temp-clone push
that follows is what actually creates the divergence — and was confusing.
Remove it and tighten the remaining setup so errors are surfaced via
`t.Fatalf` instead of being swallowed.
Per PR #125 review.
* test(git): assert strict feat-b equality after atomic rejection
The previous check (`remoteB != tipBNew`) could pass for the wrong reason —
e.g. `rev-parse` returning `""` on error would silently satisfy it. Use
the captured pre-push tip (`tipBLocal`) for an exact equality check, and
fail loudly if the remote SHA can't be read at all.
Per PR #125 review.
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -268,7 +268,7 @@ Restack, push, and create/update PRs for the entire stack.
268
268
This is the primary workflow command. By default it processes **every tracked branch** in parent-before-child order. It performs three phases:
269
269
270
270
1.**Restack**: Rebase affected branches onto their parents
271
-
2.**Push**: Force-push all affected branches (using `--force-with-lease`)
271
+
2.**Push**: Force-push all affected branches in a single atomic `git push` (`--force-with-lease --atomic`); if any ref is rejected the push fails immediately and no refs are updated
272
272
3.**PR**: Create PRs for branches without them; update PR bases for existing PRs
273
273
274
274
PRs targeting non-trunk branches are created as drafts. When a PR's base changes to trunk (after its parent merges), you'll be prompted to mark it ready for review.
0 commit comments