X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=diff.c;h=7e154265f778c645192cbf17c65b9bea2a507402;hb=05c65cb1161f232c65b186d6d6eb3bce9c6a0924;hp=374ecf3b486e218c52f94ba14481a715c19b80db;hpb=b63103e908af54e5e2eaa3faad350e4738ef0047;p=git.git diff --git a/diff.c b/diff.c index 374ecf3b4..7e154265f 100644 --- a/diff.c +++ b/diff.c @@ -1113,6 +1113,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) {