Skip to content

Document the Patch Tree Approach. #281

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,22 @@ repository](https://github.com/python/cpython). macOS and iOS are both
officially supported Python platforms, and the code distributed by this project
for those platforms is unmodified from the official repository.

Changes to to support other platforms can be included in this PR, but they must
also be submitted as a pull request against the `MAJOR.MINOR-patched` branch on
[the `freakboy3742` fork of the CPython
Changes to to support other platforms can be included in a PR for this repo, but
they must also be submitted as a pull request against the `MAJOR.MINOR-patched`
branch on [the `freakboy3742` fork of the CPython
repo](https://github.com/freakboy3742/cpython). This is required to ensure that
any contributed changes can be easily reproduced in future patches as more
changes are made.

Note that the `MAJOR.MINOR-patched` branch of that fork is maintained in the format
of a *patch tree*, which is a branch that has an entirely linear sequence of
commits applied on top of another branch (in the case of the fork, `MAJOR.MINOR`),
each of which adding a new feature. Therefore, bug fixes to the patches applied
*will* be merged, but their changes gets squashed into the commit applying the
feature. Feature additions to the patch will be squashed into a single commit,
and then merged.

This also means that if another contributor on the fork gets a pull request merged
into the fork, you must *rebase*, not merge, your changes on top of the newly pulled
`MAJOR.MINOR-patched` branch, since the "history" of a patch tree branch might
change in a way that is incompatible with merge commits.