]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'jc/whitespace-incomplete-line' into jch
authorJunio C Hamano <gitster@pobox.com>
Thu, 6 Nov 2025 23:17:15 +0000 (15:17 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 6 Nov 2025 23:17:15 +0000 (15:17 -0800)
Both "git apply" and "git diff" learn a new whitespace error class,
"incomplete-line".

Comments?

* jc/whitespace-incomplete-line:
  attr: enable incomplete-line whitespace error for this project
  diff: highlight and error out on incomplete lines
  apply: check and fix incomplete lines
  whitespace: allocate a few more bits and define WS_INCOMPLETE_LINE
  apply: revamp the parsing of incomplete lines
  diff: update the way rewrite diff handles incomplete lines
  diff: call emit_callback ecbdata everywhere
  diff: refactor output of incomplete line
  diff: fix incorrect counting of line numbers
  diff: correct suppress_blank_empty hack
  diff: emit_line_ws_markup() if/else style fix
  whitespace: correct bit assignment comments

1  2 
Documentation/config/core.adoc
diff.c
diff.h

Simple merge
diff --cc diff.c
index a1961526c0dab1af182d4f400468bf5617f5175c,965b97f7f0906e1ed870f7becead223c711d16c5..b9e891f0dd46d25529efaa2c3edeead875b532dd
--- 1/diff.c
--- 2/diff.c
+++ b/diff.c
@@@ -1351,17 -1358,7 +1358,10 @@@ static void emit_diff_symbol_from_struc
        int len = eds->len;
        unsigned flags = eds->flags;
  
 +      if (!o->file)
 +              return;
 +
        switch (s) {
-       case DIFF_SYMBOL_NO_LF_EOF:
-               context = diff_get_color_opt(o, DIFF_CONTEXT);
-               reset = diff_get_color_opt(o, DIFF_RESET);
-               putc('\n', o->file);
-               emit_line_0(o, context, NULL, 0, reset, '\\',
-                           nneof, strlen(nneof));
-               break;
        case DIFF_SYMBOL_SUBMODULE_HEADER:
        case DIFF_SYMBOL_SUBMODULE_ERROR:
        case DIFF_SYMBOL_SUBMODULE_PIPETHROUGH:
diff --cc diff.h
Simple merge