Skip to content

Commit

Permalink
dev-docs: make patch workflow idempotent for all committers
Browse files Browse the repository at this point in the history
  • Loading branch information
burgerdev committed Nov 5, 2024
1 parent f2ddd59 commit bc3aafa
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions dev-docs/patches.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,11 @@ git checkout $rev
Apply the existing patch set:

```sh
git am --committer-date-is-author-date -3 $pkgDir/*.patch
git am -3 $pkgDir/0*.patch
```

This will apply and commit each patch on top of `rev`.
Some directories contain patches that aren't meant to be applied to the source, those are excluded by the `0` prefix.

You can then place new commits on top or modify existing commits. Remember to keep the git history clean.

Expand All @@ -82,9 +83,14 @@ When updating a package, you might need to rebase the current patch set.
When done, recreate the patch set:

```sh
git format-patch -N --no-signature -o $pkgDir $rev
git format-patch -N --no-signature --zero-commit --full-index -o $pkgDir $rev
```

Don't forget to `git add` patches you just added and to `git rm` patches you removed or renamed.

The `static.yml` workflow ensures that patches can be reapplied cleanly.
If this workflow fails, applying the rendered diff should be sufficient to appease it.

# Patch documentation conventions

Patches need thorough documentation. Each reference of a patch must have a comment:
Expand Down

0 comments on commit bc3aafa

Please sign in to comment.