diff: remove dead code

When `len < 1`, len has to be 0 or negative, emit_line will then remove the first character and by then `len` would be negative. As this doesn't happen, it is safe to assume it is dead code. This continues to simplify the code, which was started in b8d9c1a66b (2009-09-03, diff.c: the builtin_diff() deals with only two-file comparison). Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Stefan Beller committed Sep 7, 2016 at 16:36 UTC ca9b37e5a8a76b7b5c9990481ce4f9894dd40392
1 file changed -8
diff.c
-8
@@ -1252,14 +1252,6 @@ static void fn_out_consume(void *priv, char *line, unsigned long len)
1252 return;
1253 }
1254
1255 - if (len < 1) {
1256 - emit_line(o, reset, reset, line, len);
1257 - if (ecbdata->diff_words
1258 - && ecbdata->diff_words->type == DIFF_WORDS_PORCELAIN)
1259 - fputs("~\n", o->file);
1260 - return;
1261 - }
1262 -
1255 if (ecbdata->diff_words) {
1256 if (line[0] == '-') {
1257 diff_words_append(line, len,