Merge #41372 from janlazo/na-patch-9010000

build(vim-patch): detect n/a patch from vim9,popupwin,tabpanel
This commit is contained in:
Justin M. Keyes
2026-08-19 04:00:19 -04:00
committed by GitHub
3 changed files with 22 additions and 8 deletions

View File

@@ -932,17 +932,20 @@ is_na_patch() {
diff-tree --no-commit-id -r -b -U0 \
'-I^\s+$' \
'-I^=+$' \
'-I^\|:redrawtabpanel|' \
'-I^\|popup_[_a-z]+\(\)\|' \
'-I^popup_[_a-z]+\(' \
'-I\*\s+For Vim version [0-9]\.[0-9]\.\s+Last change: [0-9]+ [A-Z][a-z]+ [0-9]+' \
'-I compiled (with|without) .*\(\|.+\|\) feature\.$' \
'-I\|popup-windows\|' \
'-I\|tabpanel\|' \
'-I\spopup window\s' \
"$patch" -- "${file}" |
grep -v -e '{.\+ \(available\|compiled\) \(with\|without\) .\+}' |
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
;;
@@ -989,9 +992,10 @@ is_na_patch() {
'-I\sINIT\(= .+"E[0-9]+: .*enddef"' \
'-I\sINIT\(= .+"E[0-9]+: .*([vV]im9|interface)' \
'-I\sINIT\(= .+"E1016: Cannot declare .* variable: ' \
'-I\s+INIT\(= .+"E1103: Dictionary not set' \
'-I\s+INIT\(= .+"E1370: Cannot define a .+ as static' \
'-I\schar.*\s+\*w_popup_title;' \
'-I\sINIT\(= .+"E1103: Dictionary not set' \
'-I\sINIT\(= .+"E1370: Cannot define a .+ as static' \
'-I\s(bool|char(|_u))\s+w_popup_image_[_a-zA-Z]+;' \
'-I\schar(|_u)\s+\*w_popup_title;' \
'-I\sint\s+ch_[_a-zA-Z]+;' \
'-I\sint\s+w_(filter_mode|firstline|popup_drag|want_scrollbar);' \
'-I\slist_T\s+\*w_popup_mask;' \
@@ -1000,7 +1004,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
;;
@@ -1016,19 +1020,21 @@ is_na_patch() {
'-IEVENT_TERMINALWINOPEN' \
'-I^#\s*include\s+<proto/' \
'-I^\s+\{"(popup|prop|sound)_[_a-z]+",.*f_(popup|prop|sound)_[_a-z]+},$' \
'-I^\s*(static)?\s(char_u|hashtab_T|int|void)( \*)?$' \
'-I^static\s(char_u|hashtab_T|int|void)\s\*?[^*]+\(.+\);$' \
'-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
;;

View File

@@ -32,6 +32,7 @@
^f_test_feedinput(
^f_test_garbagecollect_soon(
^f_test_getvalue(
^f_test_gui_[_a-zA-Z0-9]\+(
^f_test_ignore_error(
^f_test_null_channel(
^f_test_null_job(
@@ -49,6 +50,7 @@
^mch_job_[a-z]\+(
^mch_[_a-z]\+_job(job_T
^mem_[a-zA-Z0-9_]\+(
^parse_argument_types(
^parse_queued_messages(
^restore_buffer(bufref_T
^static int included_patches\[\] =

View File

@@ -17,6 +17,7 @@
^test_garbagecollect_soon(.\+test_garbagecollect_soon(
^test_getvalue(.\+test_getvalue(
^test_ignore_error(.\+test_ignore_error(
^test_mswin_[_a-zA-Z0-9]\+(
^test_null_channel(.\+test_null_channel(
^test_null_job(.\+test_null_job(
^test_option_not_set(.\+test_option_not_set(
@@ -46,6 +47,7 @@
\*'imcmdline'\*
\*'imdisable'\*
\*'insertmode'\*
\*'key'\*
\*'keyprotocol'\*
\*'macatsui'\*
\*'maxmem'\*
@@ -78,6 +80,7 @@
\*-v\*
\*:Print\*
\*:Vimuntar\*
\*:X\*
\*:behave\*
\*:fixdel\*
\*:helpfind\*
@@ -92,12 +95,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 +111,7 @@
\*multibyte-ime\*
\*os-support\*
\*patches-\(after-\)\?[0-9].*\*
\*pkzip\*
\*popup-window-functions\*
\*sound-functions\*
\*sound_[a-zA-Z0-9]\+()\*