[PATCHv2 02/25] diff.c: move line ending check into emit_hunk_header

2017-06-30 Thread Stefan Beller
The emit_hunk_header() function is responsible for assembling a hunk header and calling emit_line() to send the hunk header to the output file. Its only caller fn_out_consume() needs to prepare for a case where the function emits an incomplete line and add the terminating LF. Instead make sure

[PATCHv2 02/25] diff.c: move line ending check into emit_hunk_header

2017-06-22 Thread Stefan Beller
The emit_hunk_header() function is responsible for assembling a hunk header and calling emit_line() to send the hunk header to the output file. Its only caller fn_out_consume() needs to prepare for a case where the function emits an incomplete line and add the terminating LF. Instead make sure