X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Documentation%2Fgit-apply.txt;h=feb51f124ac8a806e65d41f6274c58de64d2991f;hb=ea3594e04184475226109a21e71c539ff5f139fd;hp=e9f724b2fa35cf18978dbcba9dcef7ed28a1b19d;hpb=bed625540a0e1a4ba4da9962ed53c1d83d9bf509;p=git.git diff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt index e9f724b2f..feb51f124 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=] - [--exclude=PATH] [--verbose] [...] + [--exclude=PATH] [--directory=] [--verbose] [...] DESCRIPTION ----------- @@ -182,6 +182,14 @@ behavior: by inspecting the patch (e.g. after editing the patch without adjusting the hunk headers appropriately). +--directory=:: + Prepend 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 -------------