Merge branch 'jc/apply'
authorJunio C Hamano <junkio@cox.net>
Mon, 28 Aug 2006 00:51:05 +0000 (17:51 -0700)
committerJunio C Hamano <junkio@cox.net>
Mon, 28 Aug 2006 00:51:05 +0000 (17:51 -0700)
* 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.

1  2 
Documentation/git-apply.txt
builtin-apply.c
diff.c
index 20e12ceda002d929ffc7ee13b77d0e23c7e91356,2e2acd72c7ebbe3d099456e27595b20d9d001d78..c76cfffdc6cd9982aa02e34b2b09fc22897e7402
@@@ -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 f8f5eebd2f9b6ebbad46e8d86efde535f30a194f,0b00a98aa1b283796e0c67fb42e0c9a35d74ff5c..b47ccacc2e0618476ca4816e111a97b2c46f0f4f
@@@ -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) {
 -              error |= check_patch(patch, prev_patch);
+               if (apply_verbosely)
+                       say_patch_name(stderr,
+                                      "Checking patch ", patch, "...\n");
 +              err |= check_patch(patch, prev_patch);
                prev_patch = patch;
        }
 -      return error;
 +      return err;
  }
  
  static void show_index_list(struct patch *list)
diff --cc diff.c
Simple merge