summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0e9ee32)
raw | patch | inline | side by side (parent: 0e9ee32)
author | Junio C Hamano <junkio@cox.net> | |
Sun, 27 Aug 2006 22:53:20 +0000 (15:53 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 27 Aug 2006 22:53:20 +0000 (15:53 -0700) |
After a failed "git am" attempt:
git apply --reject --verbose .dotest/patch
applies hunks that are applicable and leaves *.rej files the
rejected hunks, and it reports what it is doing. With --index,
files with a rejected hunk do not get their index entries
updated at all, so "git diff" will show the hunks that
successfully got applied.
Without --verbose to remind the user that the patch updated some
other paths cleanly, it is very easy to lose track of the status
of the working tree, so --reject implies --verbose.
Signed-off-by: Junio C Hamano <junkio@cox.net>
git apply --reject --verbose .dotest/patch
applies hunks that are applicable and leaves *.rej files the
rejected hunks, and it reports what it is doing. With --index,
files with a rejected hunk do not get their index entries
updated at all, so "git diff" will show the hunks that
successfully got applied.
Without --verbose to remind the user that the patch updated some
other paths cleanly, it is very easy to lose track of the status
of the working tree, so --reject implies --verbose.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Documentation/git-apply.txt | patch | blob | history | |
builtin-apply.c | patch | blob | history |
index 11641a92e3c3e17714f63e4bb3fd570afa6f44d3..2e2acd72c7ebbe3d099456e27595b20d9d001d78 100644 (file)
For atomicity, `git apply` fails the whole patch and
does not touch the working tree when some of the hunks
do not apply by default. This option makes it apply
- parts of the patch that are applicable, and send the
- rejected hunks to the standard output of the command.
+ parts of the patch that are applicable, and leave the
+ rejected hunks in corresponding *.rej files.
-z::
When showing the index information, do not munge paths,
diff --git a/builtin-apply.c b/builtin-apply.c
index a874375e7826ec6653dff94aad752c3cb6d17bb0..0b00a98aa1b283796e0c67fb42e0c9a35d74ff5c 100644 (file)
--- a/builtin-apply.c
+++ b/builtin-apply.c
continue;
}
if (!strcmp(arg, "--reject")) {
- apply = apply_with_reject = 1;
+ apply = apply_with_reject = apply_verbosely = 1;
continue;
}
if (!strcmp(arg, "--verbose")) {