diff options
Diffstat (limited to 'Documentation/git-apply.txt')
-rw-r--r-- | Documentation/git-apply.txt | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt index e9f724b2fa..feb51f124a 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 ------------- |