Problem
The remote is hardcoded to "origin" in StackState::new(). There is no way to change it after ez init, and no fork/upstream model exists. In fork-based workflows (common in open source), users need to:
- Push branches to their fork remote (e.g.
fork) while targeting PRs against upstream (origin)
- Override the remote per-push or per-branch
- Pass
--repo to gh pr create so PRs target the correct repository
Current behavior
state.remote is always "origin"
push.rs calls gh pr create without --repo, so gh decides the target repo
- No CLI flag or config to change the remote after init
- No per-branch or per-push remote override
Proposed solution
- Add
remote field to .git/ez/stack.json (defaulting to "origin" for backward compat)
- Add
ez config set remote <name> or ez init --remote <name> to change it
- Add
--remote flag to ez push and ez submit for per-invocation override
- Add
--repo passthrough to gh pr create calls so fork users can target upstream
- Consider a
fork_remote / upstream_remote pair for full fork model
Related
- Fork workflows are the primary use case for stacked PRs in open-source contributions
ez adopt already fetches from state.remote, so changing it would affect adopt too
Problem
The remote is hardcoded to
"origin"inStackState::new(). There is no way to change it afterez init, and no fork/upstream model exists. In fork-based workflows (common in open source), users need to:fork) while targeting PRs against upstream (origin)--repotogh pr createso PRs target the correct repositoryCurrent behavior
state.remoteis always"origin"push.rscallsgh pr createwithout--repo, soghdecides the target repoProposed solution
remotefield to.git/ez/stack.json(defaulting to"origin"for backward compat)ez config set remote <name>orez init --remote <name>to change it--remoteflag toez pushandez submitfor per-invocation override--repopassthrough togh pr createcalls so fork users can target upstreamfork_remote/upstream_remotepair for full fork modelRelated
ez adoptalready fetches fromstate.remote, so changing it would affect adopt too