diff options
author | Stefan Beller <sbeller@google.com> | 2018-08-13 18:41:21 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-08-14 14:03:05 -0700 |
commit | f103a6faef97b062aa039d8e6c361340cfd8bc02 (patch) | |
tree | 4b21fec1e76c5f9fcacb7ce15a7db5ed4e7ca6f2 /diff.c | |
parent | diff: use emit_line_0 once per line (diff) | |
download | tgif-f103a6faef97b062aa039d8e6c361340cfd8bc02.tar.xz |
diff.c: omit check for line prefix in emit_line_0
As the previous patch made sure we only call emit_line_0 once per line,
we do not need the work around introduced in f7c3b4e2d8c (diff: add an
internal option to dual-color diffs of diffs, 2018-08-13) that would ensure
we'd emit 'diff_line_prefix(o)' just once per line.
By having just one call of emit_line_0 per line, the checks are dead code.
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
-rw-r--r-- | diff.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -629,10 +629,7 @@ static void emit_line_0(struct diff_options *o, int nofirst; FILE *file = o->file; - if (first) - fputs(diff_line_prefix(o), file); - else if (!len) - return; + fputs(diff_line_prefix(o), file); if (len == 0) { has_trailing_newline = (first == '\n'); |