diff --git a/.gitattributes b/.gitattributes index 160f11b321..8b21991bf5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -13,3 +13,6 @@ src/cjson/** linguist-vendored src/unicode/** linguist-vendored .github/ export-ignore + +runtime/doc/*.txt diff=helphelp +runtime/pack/dist/opt/*/doc/*.txt diff=helphelp diff --git a/scripts/vim-patch.sh b/scripts/vim-patch.sh index 9c1f0a5172..4b47d79e4c 100755 --- a/scripts/vim-patch.sh +++ b/scripts/vim-patch.sh @@ -927,9 +927,11 @@ is_na_patch() { for file in $FILES_REMAINING; do case ${file} in runtime/doc/*.txt | runtime/pack/dist/opt/*/doc/*.txt) - HUNKS=$(git -C "${VIM_SOURCE_DIR}" diff-tree --no-commit-id -r -b -U0 \ + HUNKS=$(git -c core.attributesfile="$NVIM_SOURCE_DIR"/.gitattributes -c 'diff.helphelp.xfuncname=^.*\*[.a-zA-Z0-9\-]+\*$' -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\.$' \ + '-I^=+$' \ "$patch" -- "${file}" | grep -v -e '{.\+ \(available\|compiled\) \(with\|without\) .\+}' | grep -Pzo '(?<=\n)@@ -[0-9][^@\n]+\+[0-9][^@\n]* @@[^@\n]*\n(?=([-+][^\n]*\n)+(@|$))' | diff --git a/scripts/vim_na_hunks_vim.txt b/scripts/vim_na_hunks_vim.txt index e9e8e82b66..b981445621 100644 --- a/scripts/vim_na_hunks_vim.txt +++ b/scripts/vim_na_hunks_vim.txt @@ -4,7 +4,7 @@ ^json_decode(.\+json_decode( ^json_encode(.\+json_encode( ^err_teapot(.\+err_teapot( -^listener_[a-zA-Z0-9]\+(.\+listener_ _[a-zA-Z0-9]\+( +^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( @@ -21,3 +21,16 @@ ^test_settime(.\+test_settime( ^test_srand_seed(.\+test_srand_seed( ^test_void(.\+test_void( +\*:Print\* +\*:Vimuntar\* +\*:behave\* +\*:fixdel\* +\*:helpfind\* +\*:open\* +\*:promptfind\* +\*:promptrepl\* +\*:scriptversion\* +\*:shell\* +\*:smile\* +\*test_gui_[a-zA-Z0-9_]\+()\* +\*patches-\(after-\)\?[0-9].*\*