Skip to content

Commit ee93075

Browse files
peffgitster
authored andcommitted
apply: clarify "-p" documentation
We're not really removing slashes, but slash-separated path components. Let's make that more clear. Reported-by: kelly elton <its.the.doc@gmail.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 468165c commit ee93075

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Documentation/git-apply.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,10 @@ explained for the configuration variable `core.quotePath` (see
113113
linkgit:git-config[1]).
114114

115115
-p<n>::
116-
Remove <n> leading slashes from traditional diff paths. The
117-
default is 1.
116+
Remove <n> leading path components (separated by slashes) from
117+
traditional diff paths. E.g., with `-p2`, a patch against
118+
`a/dir/file` will be applied directly to `file`. The default is
119+
1.
118120

119121
-C<n>::
120122
Ensure at least <n> lines of surrounding context match before

0 commit comments

Comments
 (0)