Re: [PATCH v3 1/2] Allow git-apply to ignore the hunk headers (AKA recountdiff)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 5, 2008 at 6:06 PM, Johannes Schindelin
<Johannes.Schindelin@xxxxxx> wrote:
>
> +
> +               switch (*line) {
> +               case ' ': case '\n':
> +                       fragment->newlines++;
> +                       /* fall through */
> +               case '-':
> +                       fragment->oldlines++;
> +                       break;
> +               case '+':
> +                       fragment->newlines++;
> +                       if (line_nr == 0) {
> +                               fragment->leading = 1;
> +                               fragment->oldpos = 1;
> +                       }
> +                       fragment->trailing = 1;
> +                       break;
> +               case '@':
> +                       return size < 3 || prefixcmp(line, "@@ ");
> +               case 'd':
> +                       return size < 5 || prefixcmp(line, "diff ");
> +               default:
> +                       return -1;
> +               }
> +               line_nr++;
> +       }
> +}

Perhaps this is accounted for and I did not see, but I believe that
a backslash is used for the "no newline at end of file" line.  Does that
need to be allowed here?

Thanks,
Govind.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux