Add atomic push option to push and sync commands - #402
Open
wiseemily88 wants to merge 1 commit into
Open
Conversation
Expose --atomic for multi-ref pushes through the shared Git push infrastructure. Keep push non-atomic by default and preserve sync's existing atomic default with --atomic=false available as an opt-out. Document the command behavior, audit link and submit push paths, and add unit and integration coverage for atomic rejection semantics.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds configurable atomic behavior for multi-branch pushes while preserving existing defaults.
Changes:
- Adds
--atomictopush, defaulting to disabled. - Exposes
--atomiconsync, defaulting to enabled with opt-out support. - Adds integration, command, and regression coverage plus CLI documentation.
Show a summary per file
| File | Description |
|---|---|
cmd/push.go |
Adds and forwards the push atomic flag. |
cmd/push_test.go |
Tests atomic push behavior. |
cmd/sync.go |
Adds configurable atomic sync pushes. |
cmd/sync_test.go |
Tests defaults, opt-out, and force behavior. |
cmd/link_test.go |
Verifies link remains atomic. |
internal/git/gitops_test.go |
Tests all-or-nothing ref rejection. |
docs/src/content/docs/reference/cli.md |
Documents both flags and defaults. |
Review details
- Files reviewed: 7/7 changed files
- Comments generated: 0
- Review effort level: Balanced
ktravers
approved these changes
Aug 6, 2026
ktravers
left a comment
There was a problem hiding this comment.
Looks good! Basing that mainly on test coverage 😅
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.
closes https://github.com/github/pull-requests/issues/26126
Adds configurable atomic behavior for multi-ref Git pushes.
Adds
--atomictogh stack push, disabled by default.Exposes
--atomicongh stack sync, preserving its existing enabled-by-default behavior. Allows opting out during sync with--atomic=false.Passes the option through the shared Git push infrastructure.
Audits link and submit push behavior:
link continues using one atomic multi-ref push.
submit remains sequential and non-atomic because each push is interleaved with PR creation.