summaryrefslogtreecommitdiff
path: root/Documentation/git-apply.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/git-apply.txt')
-rw-r--r--Documentation/git-apply.txt35
1 files changed, 20 insertions, 15 deletions
diff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt
index aa1ae56..9cce68a 100644
--- a/Documentation/git-apply.txt
+++ b/Documentation/git-apply.txt
@@ -16,15 +16,15 @@ SYNOPSIS
[--ignore-space-change | --ignore-whitespace]
[--whitespace=(nowarn|warn|fix|error|error-all)]
[--exclude=<path>] [--include=<path>] [--directory=<root>]
- [--verbose] [--unsafe-paths] [<patch>...]
+ [--verbose | --quiet] [--unsafe-paths] [--allow-empty] [<patch>...]
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.
+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,
and does not require them to be in a Git repository.
@@ -52,7 +52,7 @@ OPTIONS
--summary::
Instead of applying the patch, output a condensed
summary of information obtained from git diff extended
- headers, such as creations, renames and mode changes.
+ headers, such as creations, renames, and mode changes.
Turns off "apply".
--check::
@@ -140,7 +140,7 @@ linkgit:git-config[1]).
applying a diff generated with `--unified=0`. To bypass these
checks use `--unidiff-zero`.
+
-Note, for the reasons stated above usage of context-free patches is
+Note, for the reasons stated above, the usage of context-free patches is
discouraged.
--apply::
@@ -159,9 +159,9 @@ discouraged.
--allow-binary-replacement::
--binary::
- Historically we did not allow binary patch applied
+ Historically we did not allow binary patch application
without an explicit permission from the user, and this
- flag was the way to do so. Currently we always allow binary
+ flag was the way to do so. Currently, we always allow binary
patch application, so this is a no-op.
--exclude=<path-pattern>::
@@ -208,7 +208,7 @@ behavior:
* `warn` outputs warnings for a few such errors, but applies the
patch as-is (default).
* `fix` outputs warnings for a few such errors, and applies the
- patch after fixing them (`strip` is a synonym --- the tool
+ patch after fixing them (`strip` is a synonym -- the tool
used to consider only trailing whitespace characters as errors, and the
fix involved 'stripping' them, but modern Gits do more).
* `error` outputs warnings for a few such errors, and refuses
@@ -228,6 +228,11 @@ behavior:
current patch being applied will be printed. This option will cause
additional information to be reported.
+-q::
+--quiet::
+ Suppress stderr output. Messages about patch status and progress
+ will not be printed.
+
--recount::
Do not trust the line counts in the hunk headers, but infer them
by inspecting the patch (e.g. after editing the patch without
@@ -251,16 +256,16 @@ When `git apply` is used as a "better GNU patch", the user can pass
the `--unsafe-paths` option to override this safety check. This option
has no effect when `--index` or `--cached` is in use.
+--allow-empty::
+ Don't return an error for patches containing no diff. This includes
+ empty patches and patches with commit text only.
+
CONFIGURATION
-------------
-apply.ignoreWhitespace::
- Set to 'change' if you want changes in whitespace to be ignored by default.
- Set to one of: no, none, never, false if you want changes in
- whitespace to be significant.
-apply.whitespace::
- When no `--whitespace` flag is given from the command
- line, this configuration item is used as the default.
+include::includes/cmd-config-section-all.txt[]
+
+include::config/apply.txt[]
SUBMODULES
----------