Merge #40883 from janlazo/na-hunk-runtime-doc_vimfn

build(vim-patch): N/A runtime/doc/*.txt updates
This commit is contained in:
Justin M. Keyes
2026-07-23 15:24:57 -04:00
committed by GitHub
4 changed files with 41 additions and 10 deletions

View File

@@ -910,21 +910,27 @@ is_na_patch() {
local NA_REGEXP="$NVIM_SOURCE_DIR/scripts/vim_na_regexp.txt"
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 NA_HUNKS_VIM="$NVIM_SOURCE_DIR/scripts/vim_na_hunks_vim.txt"
local FILES_REMAINING HUNKS HUNK_NUM_FINAL RT_NUMSTAT RT_TITLE_PAT RT_TITLE_NUM
local FILES_REMAINING HUNKS HUNK_NUM_FINAL
FILES_REMAINING="$(diff <(git -C "${VIM_SOURCE_DIR}" diff-tree --no-commit-id -r -b --name-only "$patch" | grep -v -f "$NA_REGEXP") "$NA_FILELIST" |
grep '^<' | sed 's/^< //')" || true
test -z "$FILES_REMAINING" && return 0
for file in $FILES_REMAINING; do
case ${file} in
runtime/doc/*.txt)
RT_NUMSTAT=$(git -C "${VIM_SOURCE_DIR}" diff-tree --no-commit-id -r -b --numstat "$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 -r -b -U0 "$patch" -- "${file}" |
grep -Pzc "@@\n-${RT_TITLE_PAT}\+${RT_TITLE_PAT}$")" || true
test "$RT_TITLE_NUM" -ne 1 && return 1
runtime/doc/*.txt | runtime/pack/dist/opt/*/doc/*.txt)
HUNKS=$(git -C "${VIM_SOURCE_DIR}" diff-tree --no-commit-id -r -b -U0 \
'-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\.$' \
"$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")
test "$HUNK_NUM_FINAL" -ne 0 && return 1
fi
;;
*.h)
HUNKS=$(git -C "${VIM_SOURCE_DIR}" diff-tree --no-commit-id -r -b -U0 '-I^#\s*(else|endif)' '-I^#\s*(ifdef|if.*defined\().*FEAT_' "$patch" -- "${file}")

View File

@@ -7,6 +7,7 @@ SECURITY.md
configure
runtime/bugreport.vim
runtime/defaults.vim
runtime/doc/channel.txt
runtime/doc/debug.txt
runtime/doc/debugger.txt
runtime/doc/develop.txt
@@ -80,6 +81,7 @@ src/hardcopy.c
src/iid_ole.c
src/job.c
src/kitty.c
src/logfile.c
src/mysign
src/po/ko.po
src/po/pl.po

View File

@@ -24,8 +24,8 @@
^ex_smile(
^ex_tearoff(
^f_err_teapot(
^f_listener_add(
^f_redraw_listener_add(
^f_listener_[a-zA-Z0-9]\+(
^f_redraw_listener_[a-zA-Z0-9]\+(
^f_test_alloc_fail(
^f_test_autochdir(
^f_test_feedinput(

View File

@@ -0,0 +1,23 @@
^cscope_connection(.\+cscope_connection(
^js_decode(.\+js_decode(
^js_encode(.\+js_encode(
^json_decode(.\+json_decode(
^json_encode(.\+json_encode(
^err_teapot(.\+err_teapot(
^listener_[a-zA-Z0-9]\+(.\+listener_ _[a-zA-Z0-9]\+(
^redraw_listener_[a-zA-Z0-9]\+(.\+redraw_listener_[a-zA-Z0-9]\+(
^test_alloc_fail(.\+test_alloc_fail(
^test_autochdir(.\+test_autochdir(
^test_feedinput(.\+test_feedinput(
^test_garbagecollect_soon(.\+test_garbagecollect_soon(
^test_getvalue(.\+test_getvalue(
^test_ignore_error(.\+test_ignore_error(
^test_null_channel(.\+test_null_channel(
^test_null_job(.\+test_null_job(
^test_option_not_set(.\+test_option_not_set(
^test_override(.\+test_override(
^test_scrollbar(.\+test_scrollbar(
^test_setmouse(.\+test_setmouse(
^test_settime(.\+test_settime(
^test_srand_seed(.\+test_srand_seed(
^test_void(.\+test_void(