From ebe087dd6f0e5ea6b8ca28ba79ac24032eaa7ac1 Mon Sep 17 00:00:00 2001 From: Michael Simons Date: Mon, 1 Apr 2024 16:35:25 +0000 Subject: [PATCH 1/2] Add more guidance around creating/applying patches --- README.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 53af02541e..0487d53202 100644 --- a/README.md +++ b/README.md @@ -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//*.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/). From 648b79ff83be4e8f26f1fe165d1e9af230458db2 Mon Sep 17 00:00:00 2001 From: Michael Simons Date: Mon, 1 Apr 2024 16:38:53 +0000 Subject: [PATCH 2/2] wording tweak --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0487d53202..77e4080dfa 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,7 @@ When updating a component that is used in a Pre-SBE repo, please adhere to the f 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. Steps to create new patches: 1. Make changes in the submodule.