summaryrefslogtreecommitdiff
path: root/Documentation/git-apply.txt
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-07-09 23:58:21 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-07-09 23:58:21 (GMT)
commite9a9d6edeeafa53a203c7ae379373af5394d4fde (patch)
tree5ef514ce09a744104b0d71d957824f65ac4b33ff /Documentation/git-apply.txt
parentf7484dbb835871f9526c56eb325011a312df626b (diff)
parentf55638874774acc1e13a046353449ebc8734ab08 (diff)
downloadgit-e9a9d6edeeafa53a203c7ae379373af5394d4fde.zip
git-e9a9d6edeeafa53a203c7ae379373af5394d4fde.tar.gz
git-e9a9d6edeeafa53a203c7ae379373af5394d4fde.tar.bz2
Merge branch 'js/apply-root'
* js/apply-root: git-apply --directory: make --root more similar to GNU diff apply --root: thinkofix. Teach "git apply" to prepend a prefix with "--root=<root>"
Diffstat (limited to 'Documentation/git-apply.txt')
-rw-r--r--Documentation/git-apply.txt10
1 files changed, 9 insertions, 1 deletions
diff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt
index e9f724b..feb51f1 100644
--- a/Documentation/git-apply.txt
+++ b/Documentation/git-apply.txt
@@ -14,7 +14,7 @@ SYNOPSIS
[--allow-binary-replacement | --binary] [--reject] [-z]
[-pNUM] [-CNUM] [--inaccurate-eof] [--recount] [--cached]
[--whitespace=<nowarn|warn|fix|error|error-all>]
- [--exclude=PATH] [--verbose] [<patch>...]
+ [--exclude=PATH] [--directory=<root>] [--verbose] [<patch>...]
DESCRIPTION
-----------
@@ -182,6 +182,14 @@ behavior:
by inspecting the patch (e.g. after editing the patch without
adjusting the hunk headers appropriately).
+--directory=<root>::
+ Prepend <root> to all filenames. If a "-p" argument was passed, too,
+ it is applied before prepending the new root.
++
+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`.
+
Configuration
-------------