From 2e9b06caf77eacfebfe43d6f42ec444f546f32bd Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Mon, 13 Jul 2026 18:44:19 -0400 Subject: [PATCH 1/2] build(vim-patch): N/A runtime/doc/*.txt changes Vim's runtime/doc/*.txt may change the 1st line only for publish datetime. Nvim removed those datetimes. TODO - src/version.h for vX.Y.0000 patch. --- scripts/vim-patch.sh | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/scripts/vim-patch.sh b/scripts/vim-patch.sh index 647d304c2a..a69c3a9386 100755 --- a/scripts/vim-patch.sh +++ b/scripts/vim-patch.sh @@ -911,20 +911,32 @@ is_na_patch() { local NA_FILELIST="$NVIM_SOURCE_DIR/scripts/vim_na_files.txt" local NA_HUNKS_C="$NVIM_SOURCE_DIR/scripts/vim_na_hunks_c.txt" - local FILES_REMAINING C_FILES + local FILES_REMAINING HUNKS HUNK_NUM_FINAL RT_NUMSTAT RT_TITLE_PAT RT_TITLE_NUM FILES_REMAINING="$(diff <(git -C "${VIM_SOURCE_DIR}" diff-tree --no-commit-id --name-only -r "$patch" | grep -v -f "$NA_REGEXP") "$NA_FILELIST" | grep '^<' | sed 's/^< //')" || true test -z "$FILES_REMAINING" && return 0 - C_FILES=$(echo "$FILES_REMAINING" | grep '.*\.c$') - test "$FILES_REMAINING" != "$C_FILES" && return 1 - - for file in $C_FILES; do - HUNKS=$(git -C "${VIM_SOURCE_DIR}" diff-tree --no-commit-id -U0 -r "$patch" -- "$file" | grep -P '^@@ .* @@') - if test -n "$HUNKS"; then - HUNK_NUM_FINAL=$(echo "$HUNKS" | sed 's/^@@ .* @@ \?//' | grep -cv -f "$NA_HUNKS_C") - test "$HUNK_NUM_FINAL" -ne 0 && return 1 - fi + for file in $FILES_REMAINING; do + case ${file} in + runtime/doc/*.txt) + RT_NUMSTAT=$(git -C "${VIM_SOURCE_DIR}" diff-tree --no-commit-id --numstat -r "$patch" -- "${file}" | grep -c '^1\s\+1\s\+') + test "${RT_NUMSTAT}" -ne 1 && return 1 + RT_TITLE_PAT="\*$(basename "${file}")\*\s+For Vim version [0-9]\.[0-9]\.\s+Last change: [0-9]+ [A-Z][a-z]+ [0-9]+\n" + RT_TITLE_NUM="$(git -C "${VIM_SOURCE_DIR}" diff-tree --no-commit-id -U0 -r "$patch" -- "${file}" | + grep -Pzc "@@\n-${RT_TITLE_PAT}\+${RT_TITLE_PAT}$")" || true + test "$RT_TITLE_NUM" -ne 1 && return 1 + ;; + *.c) + HUNKS=$(git -C "${VIM_SOURCE_DIR}" diff-tree --no-commit-id -U0 -r "$patch" -- "$file" | grep -P '^@@ .* @@') + if test -n "$HUNKS"; then + HUNK_NUM_FINAL=$(echo "$HUNKS" | sed 's/^@@ .* @@ \?//' | grep -cv -f "$NA_HUNKS_C") + test "$HUNK_NUM_FINAL" -ne 0 && return 1 + fi + ;; + *) + return 1 + ;; + esac done return 0 From 02290ba155301af0420784a4a0efba8d5b78e53c Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Tue, 14 Jul 2026 01:34:44 -0400 Subject: [PATCH 2/2] build(vim-patch): detect patch v8.2.0000 as N/A Following features must be N/A to detect v8.Y.0000 as N/A - VisVim - Windows *.def files - Gvim - runtime/doc/version8.txt ("too old") (https://github.com/neovim/neovim/pull/1116 deletes version7.txt) --- scripts/vim_na_files.txt | 1 + scripts/vim_na_regexp.txt | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/vim_na_files.txt b/scripts/vim_na_files.txt index d333b19f42..39a425dd86 100644 --- a/scripts/vim_na_files.txt +++ b/scripts/vim_na_files.txt @@ -138,6 +138,7 @@ src/testdir/util/vms.vim src/typemap src/uninstall.c src/version.h +src/vim.def src/vimrun.c src/winclip.c uninstall.txt diff --git a/scripts/vim_na_regexp.txt b/scripts/vim_na_regexp.txt index 84e2828721..9588285bc4 100644 --- a/scripts/vim_na_regexp.txt +++ b/scripts/vim_na_regexp.txt @@ -6,7 +6,7 @@ ^pixmaps/ ^runtime/colors/tools/ ^runtime/doc/gui_ -^runtime/doc/version[4-6]\.txt +^runtime/doc/version[4-8]\.txt ^runtime/doc/vim9 ^runtime/hi[1-9] ^runtime/icons @@ -38,6 +38,7 @@ ^src/GvimExt/ ^src/INSTALL ^src/Make +^src/VisVim/ ^src/[a-z]\+_cmdidxs\.h$ ^src/auto/ ^src/beval @@ -46,6 +47,7 @@ ^src/configure ^src/crypt ^src/gui[_.] +^src/gvim ^src/if_ ^src/install ^src/json[_.]