diff options
Diffstat (limited to 'Documentation/git-apply.txt')
-rw-r--r-- | Documentation/git-apply.txt | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt index d9ed6a1a4e..4ebc3d3271 100644 --- a/Documentation/git-apply.txt +++ b/Documentation/git-apply.txt @@ -13,7 +13,7 @@ SYNOPSIS [--apply] [--no-add] [--build-fake-ancestor=<file>] [-R | --reverse] [--allow-binary-replacement | --binary] [--reject] [-z] [-p<n>] [-C<n>] [--inaccurate-eof] [--recount] [--cached] - [--ignore-space-change | --ignore-whitespace ] + [--ignore-space-change | --ignore-whitespace] [--whitespace=(nowarn|warn|fix|error|error-all)] [--exclude=<path>] [--include=<path>] [--directory=<root>] [--verbose] [--unsafe-paths] [<patch>...] @@ -21,6 +21,8 @@ SYNOPSIS DESCRIPTION ----------- Reads the supplied diff output (i.e. "a patch") and applies it to files. +When running from a subdirectory in a repository, patched paths +outside the directory are ignored. With the `--index` option the patch is also applied to the index, and with the `--cached` option the patch is only applied to the index. Without these options, the command applies the patch only to files, @@ -64,7 +66,7 @@ OPTIONS disables it is in effect), make sure the patch is applicable to what the current index file records. If the file to be patched in the working tree is not - up-to-date, it is flagged as an error. This flag also + up to date, it is flagged as an error. This flag also causes the index file to be updated. --cached:: @@ -106,10 +108,9 @@ the information is read from the current index instead. When `--numstat` has been given, do not munge pathnames, but use a NUL-terminated machine-readable format. + -Without this option, each pathname output will have TAB, LF, double quotes, -and backslash characters replaced with `\t`, `\n`, `\"`, and `\\`, -respectively, and the pathname will be enclosed in double quotes if -any of those replacements occurred. +Without this option, pathnames with "unusual" characters are quoted as +explained for the configuration variable `core.quotePath` (see +linkgit:git-config[1]). -p<n>:: Remove <n> leading slashes from traditional diff paths. The @@ -258,7 +259,7 @@ treats these changes as follows. If `--index` is specified (explicitly or implicitly), then the submodule commits must match the index exactly for the patch to apply. If any of the submodules are checked-out, then these check-outs are completely -ignored, i.e., they are not required to be up-to-date or clean and they +ignored, i.e., they are not required to be up to date or clean and they are not updated. If `--index` is not specified, then the submodule commits in the patch |