From a98858651ee5abd2bc68226c8d0ad49fef324f04 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Tue, 18 Aug 2026 21:36:27 -0400 Subject: [PATCH] build(vim-patch): n/a docs from 9.0.1481, keep hunks without header switch/case and goto labels v9.0.1481 and similar patches from auto-N/A. Blacklist as much as possible to auto-N/A later crypt patches. Hunks without header in "*.h" is valid if only littered with #ifdefs or change is isolated to 1st line but "src/feature.h" should be mostly N/A after Nvim removed "FEAT_" guards. Wonder if certain patches with only "*.h" changes were mistakenly marked N/A. --- scripts/vim-patch.sh | 8 +++++--- scripts/vim_na_hunks_vim.txt | 5 +++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/scripts/vim-patch.sh b/scripts/vim-patch.sh index e22e4701b0..765adc2b64 100755 --- a/scripts/vim-patch.sh +++ b/scripts/vim-patch.sh @@ -942,7 +942,7 @@ is_na_patch() { grep -Pzo '(?<=\n)@@ -[0-9][^@\n]+\+[0-9][^@\n]* @@[^@\n]*\n(?=([-+][^\n]*\n)+(@|$))' | tr '\0' '\n') if test -n "$HUNKS"; then - HUNK_NUM_FINAL=$(echo "$HUNKS" | sed 's/^@@ .* @@ \?//' | grep -cv -f "$NA_HUNKS_VIM") + HUNK_NUM_FINAL=$(echo "$HUNKS" | sed 's/^@@ .* @@ //' | grep -cv -f "$NA_HUNKS_VIM") test "$HUNK_NUM_FINAL" -ne 0 && return 1 fi ;; @@ -1000,7 +1000,7 @@ is_na_patch() { "$patch" -- "${file}" | grep '^@@ .* @@') if test -n "$HUNKS"; then - HUNK_NUM_FINAL=$(echo "$HUNKS" | sed 's/^@@ .* @@ \?//' | grep -cv -f "$NA_HUNKS_H") + HUNK_NUM_FINAL=$(echo "$HUNKS" | sed 's/^@@ .* @@ //' | grep -cv -f "$NA_HUNKS_H") test "$HUNK_NUM_FINAL" -ne 0 && return 1 fi ;; @@ -1019,16 +1019,18 @@ is_na_patch() { '-I^\s*(static)?\s(char_u|hashtab_T|int|void)( \*)?$' \ '-I^static\s(char_u|hashtab_T|int|void)\s\*?[^*]+\(.+\);$' \ '-I#\s*define.*ex_ni$' \ + '-I[.>]b_p_key' \ '-I[_.>]sc_version = ' \ '-I[_.>]uf_script_ctx_version = ' \ '-I = skip_type\(.+\);$' \ '-Icheck_typval_type\(.+\)' \ + '-Icrypt_get_method_nr\(.+\)' \ '-I\spopup_set_firstline\(.+\);' \ '-I\svim_free\(.*w_popup_title\);' \ "$patch" -- "${file}" | grep '^@@ .* @@') if test -n "$HUNKS"; then - HUNK_NUM_FINAL=$(echo "$HUNKS" | sed 's/^@@ .* @@ \?//' | grep -cv -f "$NA_HUNKS_C") + HUNK_NUM_FINAL=$(echo "$HUNKS" | sed 's/^@@ .* @@ //' | grep -cv -f "$NA_HUNKS_C") test "$HUNK_NUM_FINAL" -ne 0 && return 1 fi ;; diff --git a/scripts/vim_na_hunks_vim.txt b/scripts/vim_na_hunks_vim.txt index 0e38f1e598..5b8e163358 100644 --- a/scripts/vim_na_hunks_vim.txt +++ b/scripts/vim_na_hunks_vim.txt @@ -46,6 +46,7 @@ \*'imcmdline'\* \*'imdisable'\* \*'insertmode'\* +\*'key'\* \*'keyprotocol'\* \*'macatsui'\* \*'maxmem'\* @@ -78,6 +79,7 @@ \*-v\* \*:Print\* \*:Vimuntar\* +\*:X\* \*:behave\* \*:fixdel\* \*:helpfind\* @@ -92,12 +94,14 @@ \*DirChangedPre\* \*E984\* \*E999\* +\*E119[3-9]\* \*HelpToc-mappings\* \*SafeStateAgain\* \*SigUSR1\* \*TerminalOpen\* \*TerminalWinOpen\* \*autocommand-events\* +\*blowfish\* \*builtin-function-list\* \*emacs[_-]tags\* \*global-ime\* @@ -106,6 +110,7 @@ \*multibyte-ime\* \*os-support\* \*patches-\(after-\)\?[0-9].*\* +\*pkzip\* \*popup-window-functions\* \*sound-functions\* \*sound_[a-zA-Z0-9]\+()\*