summaryrefslogtreecommitdiff
path: root/builtin-apply.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-07-07 01:36:01 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-07-07 02:33:08 (GMT)
commitf55638874774acc1e13a046353449ebc8734ab08 (patch)
treeec45c4c37712d651ec7caa1100aaddd4d7c96944 /builtin-apply.c
parent8ee4a6c2ec6738cfbc815dc59e44825f2a9b9f15 (diff)
downloadgit-f55638874774acc1e13a046353449ebc8734ab08.zip
git-f55638874774acc1e13a046353449ebc8734ab08.tar.gz
git-f55638874774acc1e13a046353449ebc8734ab08.tar.bz2
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 'builtin-apply.c')
-rw-r--r--builtin-apply.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin-apply.c b/builtin-apply.c
index 6c3db60..c242bbd 100644
--- a/builtin-apply.c
+++ b/builtin-apply.c
@@ -3130,8 +3130,8 @@ int cmd_apply(int argc, const char **argv, const char *unused_prefix)
inaccurate_eof = 1;
continue;
}
- if (!prefixcmp(arg, "--root=")) {
- arg += strlen("--root=");
+ if (!prefixcmp(arg, "--directory=")) {
+ arg += strlen("--directory=");
root_len = strlen(arg);
if (root_len && arg[root_len - 1] != '/') {
char *new_root;