diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-11-05 13:30:51 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-11-05 13:37:20 -0800 |
| commit | 0cfb6ab295e67a619b51e306c728ce43eb275f9f (patch) | |
| tree | bc83344212e62e5dd2600d2ee7740f409d190906 /commit.c | |
| parent | apply: check and fix incomplete lines (diff) | |
| download | git-0cfb6ab295e67a619b51e306c728ce43eb275f9f.tar.gz git-0cfb6ab295e67a619b51e306c728ce43eb275f9f.zip | |
diff: highlight and error out on incomplete lines
Teach "git diff" to highlight "\ No newline at end of file" message
as a whitespace error when incomplete-line whitespace error class is
in effect. Thanks to the previous refactoring of complete rewrite
code path, we can do this at a single place.
Unlike whitespace errors in the payload where we need to annotate in
line, possibly using colors, the line that has whitespace problems,
we have a dedicated line already that can serve as the error
message, so paint it as a whitespace error message.
Also teach "git diff --check" to notice incomplete lines as
whitespace errors and report when incomplete-line whitespace error
class is in effect.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
0 files changed, 0 insertions, 0 deletions
