]> git.ipfire.org Git - thirdparty/git.git/commit
diff: refactor output of incomplete line
authorJunio C Hamano <gitster@pobox.com>
Wed, 12 Nov 2025 22:02:51 +0000 (14:02 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 12 Nov 2025 22:04:04 +0000 (14:04 -0800)
commit29228cbdc5f8a80b1f61c7cc209ba8e3714cc38e
tree18d54fe85f03ca9b82099f486014f9bc6adc560b
parentced0561828271e8fc3fa2699754c5925969111b5
diff: refactor output of incomplete line

Create a helper function that reacts to "\ No newline at the end of
file" in preparation for unifying the incomplete line handling in
the code path that handles xdiff output and the code path that
bypasses xdiff and produces a complete-rewrite patch.

Currently the output from the DIFF_SYMBOL_CONTEXT_INCOMPLETE case
still (ab)uses the same code as what is used for context lines, but
that would change in a later step where we introduce support to treat
an incomplete line as a whitespace error.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff.c