Re: [PATCH 17/26] diff.c: convert show_stats to use emit_diff_symbol
- From
Stefan Beller <sbeller@google.com>
- Date
- Jun 21, 2017, 22:16 UTC
- Message-ID
- <CAGZ79kbQRy_gv7ZYiFM6CbF-sDnBVpP=dP+qa7aqxPH+MiQNig@mail.gmail.com>
- In-Reply-To
- <20170621213949.GD53348@google.com>
Show 8 quoted lines
>> case DIFF_SYMBOL_SUBMODULE_PIPETHROUGH: >> emit_line(o, "", "", line, len); >> break; >> + case DIFF_SYMBOL_STATS_SUMMARY_NO_FILES: >> + fprintf(o->file, " 0 files changed\n"); > > Why is this one a fprintf call instead of an emit_line call? I'm sure > this is intended It just stands out to me.
I am sure it is unintended to stand out in such a way. Originally I wanted to make it as close 1:1 conversion, and as we did not emit the line prefix at the time but relied on the line prefix being emitted prior to when this was printed. Will convert to emit_line as that seems to be a bug in this patch.