third_party/skia/site/dev/contrib/patch.md
If you are a Skia committer and have been asked to commit an externally-submitted patch, this is how to do it. (This technique is useful in other situations too, like if you just want to try out somebody else's patch locally.)
Notes:
If you use git cl, then you should be able to use the shortcut:
git cl patch 6201055
If you use gcl, or the above doesn't work, the following should always work.
Prepare your local workspace to accept the patch.
Download the raw patch set.
curl https://codereview.appspot.com/download/issue6201055_1.diff
--output patch.txt
# or...
wget https://codereview.appspot.com/download/issue6201055_1.diff
--output-document=patch.txt
Apply this patch to your local checkout.
patch -p1 <patch.txt
Complications: If the patch fails to apply, the following may be happening:
Wrong revision. Maybe your local workspace is not up to date? Or maybe the patch was made against an old revision of the repository, and cannot be applied to the latest revision? (In that case, revert any changes and sync your workspace to an older revision, then re-apply the patch.)