summaryrefslogtreecommitdiffstats
path: root/git-apply.txt
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-03-03 15:14:25 -0800
committerJunio C Hamano <gitster@pobox.com>2015-03-03 15:14:25 -0800
commit22b7549f5378e280118862e7618171c14db05d88 (patch)
treee8082c39aa33ff201475ad6f1997189d3dc4baeb /git-apply.txt
parent9c66b3659d279e45c6ea4bb9f364491ffb9494a9 (diff)
downloadgit-htmldocs-22b7549f5378e280118862e7618171c14db05d88.tar.gz
Autogenerated HTML docs for v2.3.1-184-g97c12
Diffstat (limited to 'git-apply.txt')
-rw-r--r--git-apply.txt12
1 files changed, 11 insertions, 1 deletions
diff --git a/git-apply.txt b/git-apply.txt
index f60532794..9489664cf 100644
--- a/git-apply.txt
+++ b/git-apply.txt
@@ -16,7 +16,7 @@ SYNOPSIS
[--ignore-space-change | --ignore-whitespace ]
[--whitespace=(nowarn|warn|fix|error|error-all)]
[--exclude=<path>] [--include=<path>] [--directory=<root>]
- [--verbose] [<patch>...]
+ [--verbose] [--unsafe-paths] [<patch>...]
DESCRIPTION
-----------
@@ -229,6 +229,16 @@ For example, a patch that talks about updating `a/git-gui.sh` to `b/git-gui.sh`
can be applied to the file in the working tree `modules/git-gui/git-gui.sh` by
running `git apply --directory=modules/git-gui`.
+--unsafe-paths::
+ By default, a patch that affects outside the working area
+ (either a Git controlled working tree, or the current working
+ directory when "git apply" is used as a replacement of GNU
+ patch) is rejected as a mistake (or a mischief).
++
+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.
+
Configuration
-------------