Skip to content

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

Merged
hugovk merged 6 commits into
python:mainfrom
cmaloney:pr-remote-git-config
Nov 12, 2026
Merged

hugovk merged 6 commits into
python:mainfrom
cmaloney:pr-remote-git-config

Conversation

@cmaloney

Copy link
Copy Markdown
Contributor

--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.
@cmaloney
cmaloney requested a review from hugovk November 5, 2026 20:04
Comment thread cherry_picker/cherry_picker.py Resolved
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
@hugovk
hugovk merged commit af11399 into python:main Nov 12, 2026
26 checks passed
@cmaloney
cmaloney deleted the pr-remote-git-config branch November 12, 2026 20:38
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