Skip to content

Default --pr-remote to Git's remote.pushDefault - #198

Open
cmaloney wants to merge 3 commits into
python:mainfrom
cmaloney:pr-remote-git-config
Open

cmaloney wants to merge 3 commits into
python:mainfrom
cmaloney:pr-remote-git-config

Conversation

@cmaloney

Copy link
Copy Markdown

--pr-remote defaults to origin. Anyone whose fork remote has another name has to pass the flag on every call, including --continue. Forgetting it on --continue fails the push, and the backport branch is deleted anyway (#78).

Proposal: if --pr-remote isn't given, use git config remote.pushDefault, falling back to origin. That's Git's standard "where my pushes go" setting, so per-repo, --global and includeIf setups all work without cherry_picker needing a config surface of its own. Users who don't set it see no change.

Precedent:

Developed with AI (Claude Opus 5.5)

Currently --pr-remote defaults to origin but for cpython many repos
need at least two remotes. Remembering to provide --pr-remote every time
is hard, so make a way of providing a value.

Chose to reuse git's existing config option to minimize cherry_picker
specific infrastructure and documentation.
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.

1 participant