Skip to content

Add more guidance around creating/applying patches #301

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 2 commits into from
Apr 1, 2024
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: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,26 @@ When updating a component that is used in a Pre-SBE repo, please adhere to the f

## Patches

When creating/updating patches, it is desirable to backport the changes whenever feasible as this reduces
1. When creating/updating patches, it is desirable to backport the changes whenever feasible as this reduces
the maintenance burden when [updating a component to a newer version](#updating-an-external-component-to-a-newer-version).

1. Steps to create new patches:

1. Make changes in the submodule.

1. Commit changes in the submodule.

1. From the root directory of the submodule, run [extract-patches.sh](extract-patches.sh)/[extract-patches.ps1](extract-patches.ps1).
The script will prepare a patch based on the base sha of the submodule and the latest committed changes. The patch
will be added to patches/<component>/*.patch

1. To apply a patch, or multiple patches, use `git am` while inside the submodule directory
For example, to apply *all* `humanizer` patches:

```sh
# cd src/humanizer
# git am "../../patches/humanizer/*"
```
## Found an Issue?

Source build related issues are tracked in the [source build repo](https://github.com/dotnet/source-build/).
Expand Down