Skip to content

Commit

Permalink
Mirror the changes from patch to git apply, in the manual and master_…
Browse files Browse the repository at this point in the history
…changes.md
  • Loading branch information
kit-ty-kate authored and rjbou committed Mar 4, 2024
1 parent b917854 commit 30f9ab7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
14 changes: 8 additions & 6 deletions doc/pages/Manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -888,10 +888,11 @@ files.
- <a id="opamfield-patches">`patches: [ <string> { <filter> } ... ]`</a>: a list
of files relative to the project source root (often added through the `files/`
metadata subdirectory). The listed patch files will be applied sequentially to
the source as with the `patch` command, stripping one level of leading
directories (`-p1`) -- which is what version control systems generally use .
Variable interpolation is available, so you can specify `patches: [ "file" ]`
to have the patch processed from `file.in`.
the source using the `patch` command (before opam 2.2) or `git apply`
(since opam 2.2), stripping one level of leading directories (`-p1`) -- which
is what version control systems generally use. Variable interpolation is
available, so you can specify `patches: [ "file" ]` to have the patch
processed from `file.in`.

Patches may be applied conditionally by adding _filters_.

Expand Down Expand Up @@ -1531,8 +1532,9 @@ them modified with [`opam option --global`](man/opam-option.html).
- `quorum`: integer, the currently defined quorum
- `repo`: directory containing the already-validated state of the repository
(empty for an initial validation)
- `patch`: for incremental validation, filename of a patch applying to
`repo` (with `patch -p1`) and that needs verification
- `patch`: for incremental validation, filename of a patch applying to `repo`
(using `patch -p1` before opam 2.2, and using `git apply -p1` since opam 2.2)
and that needs verification
- `dir`: for initial validation, the directory to verify
- `incremental`: `false` if doing an initial validation based on `dir`,
`true` for an incremental validation based on `repo` and `patch`.
Expand Down
1 change: 1 addition & 0 deletions master_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,3 +156,4 @@ users)

## opam-core
* `OpamStd.Sys`: add `is_cygwin_variant_cygcheck` that returns true if in path `cygcheck` is from a Cygwin or MSYS2 installation [#5843 @rjbou]
* `OpamSystem.patch`: use `git -c core.autocrlf=false apply --unsafe-paths -p1 <patch>` instead of `patch` [#5400 @kit-ty-kate - fix #3433 #3782 #3639]

0 comments on commit 30f9ab7

Please sign in to comment.