X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=diff.c;h=2e6965e84b8d87f46081f8b26b9d3fa8554c4049;hb=c7c2bc0ac9e7f077771db53960d4917fda4b27a7;hp=9038f190ece061696a3290acf8f1e9951e9d0a6c;hpb=1f2705e20fa5f2d3c93663296eef723f45d1fa41;p=git.git diff --git a/diff.c b/diff.c index 9038f190e..2e6965e84 100644 --- a/diff.c +++ b/diff.c @@ -1111,6 +1111,15 @@ static void fn_out_consume(void *priv, char *line, unsigned long len) diff_words_append(line, len, &ecbdata->diff_words->plus); return; + } else if (!prefixcmp(line, "\\ ")) { + /* + * Eat the "no newline at eof" marker as if we + * saw a "+" or "-" line with nothing on it, + * and return without diff_words_flush() to + * defer processing. If this is the end of + * preimage, more "+" lines may come after it. + */ + return; } diff_words_flush(ecbdata); if (ecbdata->diff_words->type == DIFF_WORDS_PORCELAIN) {