From: Junio C Hamano Date: Mon, 28 Aug 2006 00:51:05 +0000 (-0700) Subject: Merge branch 'jc/apply' X-Git-Tag: v1.4.3-rc1~176 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/b32d37a3a6817ba307062fe2f7b6d9cfb85a1ebd Merge branch 'jc/apply' * jc/apply: git-apply --reject: finishing touches. apply --reject: count hunks starting from 1, not 0 git-apply --verbose git-apply --reject: send rejects to .rej files. git-apply --reject apply --reverse: tie it all together. diff.c: make binary patch reversible. builtin-apply --reverse: two bugfixes. --- b32d37a3a6817ba307062fe2f7b6d9cfb85a1ebd diff --cc Documentation/git-apply.txt index 20e12ceda0,2e2acd72c7..c76cfffdc6 --- a/Documentation/git-apply.txt +++ b/Documentation/git-apply.txt @@@ -72,11 -67,11 +72,11 @@@ OPTION Apply the patch in reverse. --reject:: - For atomicity, `git apply` fails the whole patch and + For atomicity, gitlink:git-apply[1] by default 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 leave the + do not apply. This option makes it apply - the parts of the patch that are applicable, and send the - rejected hunks to the standard output of the command. ++ the 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 --cc builtin-apply.c index f8f5eebd2f,0b00a98aa1..b47ccacc2e --- a/builtin-apply.c +++ b/builtin-apply.c @@@ -1905,13 -1944,16 +1942,16 @@@ static int check_patch(struct patch *pa static int check_patch_list(struct patch *patch) { struct patch *prev_patch = NULL; - int error = 0; + int err = 0; for (prev_patch = NULL; patch ; patch = patch->next) { + if (apply_verbosely) + say_patch_name(stderr, + "Checking patch ", patch, "...\n"); - error |= check_patch(patch, prev_patch); + err |= check_patch(patch, prev_patch); prev_patch = patch; } - return error; + return err; } static void show_index_list(struct patch *list)