Skip to content

restack: Add Options parameter to high-level restack entry points#1307

Open
ed-irl wants to merge 1 commit into
mainfrom
ed-irl/restack-options-param
Open

restack: Add Options parameter to high-level restack entry points#1307
ed-irl wants to merge 1 commit into
mainfrom
ed-irl/restack-options-param

Conversation

@ed-irl

@ed-irl ed-irl commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

RestackBranch, RestackStack, and RestackDownstack now take an *restack.Options argument, exposing a per-invocation AutoResolve *bool override that is threaded through to Request.AutoResolve. A nil Options (or nil AutoResolve) preserves the existing default behavior.

All callers in the merge, sync, and CLI restack commands pass nil for now; the RestackHandler interfaces and generated mocks are updated to match the new signatures.

Introduces restack.Options{AutoResolve} and threads an opts *Options
parameter through the high-level restack entry points (RestackBranch,
RestackStack, RestackDownstack) and the merge/sync RestackHandler
interfaces, with all current callers passing nil.

This is foundational plumbing for the restack auto-resolve feature.
Landing it on a branch below the consuming stacks lets every branch
inherit the 3-arg signature, rather than the signature change living
on a branch parallel to its callers.
@ed-irl

ed-irl commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator Author

This was referenced Jun 24, 2026
This was referenced Jun 24, 2026
@abhinav

abhinav commented Jul 2, 2026

Copy link
Copy Markdown
Owner

extracted just the options plumbing into #1332, moving Options into Request structs. the pattern we've been using with handler options is that they define CLI flags and configs, and the outer request object defines the general runtime parameters.

abhinav added a commit that referenced this pull request Jul 2, 2026
Extracted from #1307

Restack handler entry points now receive operation request structs
instead of loose branch and options parameters. The request structs
carry
optional Options fields, matching the handler request pattern used by
the
surrounding handler packages.

UpstackOptions embeds the shared Options type while keeping SkipStart as
the only active option. AutoResolve is intentionally not part of this
commit.
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.

2 participants