diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-07-06 18:36:01 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-07-06 19:33:08 -0700 |
commit | f55638874774acc1e13a046353449ebc8734ab08 (patch) | |
tree | ec45c4c37712d651ec7caa1100aaddd4d7c96944 /Documentation/git-apply.txt | |
parent | apply --root: thinkofix. (diff) | |
download | tgif-f55638874774acc1e13a046353449ebc8734ab08.tar.xz |
git-apply --directory: make --root more similar to GNU diff
Applying a patch in the directory that is different from what the patch
records is done with --directory option in GNU diff. The --root option we
introduced previously does the same, and we can call it the same way to
give users more familiar feel.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-apply.txt')
-rw-r--r-- | Documentation/git-apply.txt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Documentation/git-apply.txt b/Documentation/git-apply.txt index 63fce53690..3cd3179ff1 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] [--cached] [--whitespace=<nowarn|warn|fix|error|error-all>] - [--exclude=PATH] [--root=<root>] [--verbose] [<patch>...] + [--exclude=PATH] [--directory=<root>] [--verbose] [<patch>...] DESCRIPTION ----------- @@ -177,9 +177,13 @@ behavior: current patch being applied will be printed. This option will cause additional information to be reported. ---root=<root>:: +--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 ------------- |