Skip to content

Add atomic push option to push and sync commands - #402

Open
wiseemily88 wants to merge 1 commit into
mainfrom
add_atomic_flag_to_push
Open

Add atomic push option to push and sync commands#402
wiseemily88 wants to merge 1 commit into
mainfrom
add_atomic_flag_to_push

Conversation

@wiseemily88

Copy link
Copy Markdown
Contributor

closes https://github.com/github/pull-requests/issues/26126

Adds configurable atomic behavior for multi-ref Git pushes.

Adds --atomic to gh stack push, disabled by default.

Exposes --atomicon gh 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.

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.
Copilot AI balanced review requested due to automatic review settings August 5, 2026 22:55
@wiseemily88
wiseemily88 requested a review from skarim as a code owner August 5, 2026 22:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds configurable atomic behavior for multi-branch pushes while preserving existing defaults.

Changes:

  • Adds --atomic to push, defaulting to disabled.
  • Exposes --atomic on sync, 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 ktravers 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.

Looks good! Basing that mainly on test coverage 😅

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