Code

apply --reject: count hunks starting from 1, not 0
authorJunio C Hamano <junkio@cox.net>
Tue, 22 Aug 2006 22:49:28 +0000 (15:49 -0700)
committerJunio C Hamano <junkio@cox.net>
Tue, 22 Aug 2006 22:49:28 +0000 (15:49 -0700)
Signed-off-by: Junio C Hamano <junkio@cox.net>
builtin-apply.c

index 42253e6a72379b49c1d562542245e176cba9c98a..a874375e7826ec6653dff94aad752c3cb6d17bb0 100644 (file)
@@ -2313,7 +2313,7 @@ static int write_out_one_reject(struct patch *patch)
         */
        fprintf(rej, "diff a/%s b/%s\t(rejected hunks)\n",
                patch->new_name, patch->new_name);
-       for (cnt = 0, frag = patch->fragments;
+       for (cnt = 1, frag = patch->fragments;
             frag;
             cnt++, frag = frag->next) {
                if (!frag->rejected) {