From 4a1a86a2bea4b88a8c981cabf2cf131830012edc Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Wed, 3 Feb 2021 18:53:27 -0500 Subject: [PATCH] vim-patch.sh: remove unsupported files (#13570) Add files listed in https://github.com/neovim/neovim/wiki/Merging-patches-from-upstream-Vim#na-not-applicable-patches. --- scripts/vim-patch.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/scripts/vim-patch.sh b/scripts/vim-patch.sh index 551b8fb691..f583b2fdea 100755 --- a/scripts/vim-patch.sh +++ b/scripts/vim-patch.sh @@ -180,8 +180,12 @@ preprocess_patch() { local file="$1" local nvim="nvim -u NORC -i NONE --headless" - # Remove *.proto, Make*, gui_*, some if_* - local na_src='proto\|Make*\|gui_*\|if_lua\|if_mzsch\|if_olepp\|if_ole\|if_perl\|if_py\|if_ruby\|if_tcl\|if_xcmdsrv' + # Remove Filelist, README + local na_files='Filelist\|README.*' + 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/\<\%('"${na_files}"'\)\>@norm! d/\v(^diff)|%$ ' +w +q "$file" + + # Remove *.proto, Make*, INSTALL*, gui_*, beval.*, some if_*, gvim, libvterm, tee, VisVim, xpm, xxd + local na_src='auto\|configure.*\|GvimExt\|libvterm\|proto\|tee\|VisVim\|xpm\|xxd\|Make*\|INSTALL*\|beval.*\|gui_*\|if_lua\|if_mzsch\|if_olepp\|if_ole\|if_perl\|if_py\|if_ruby\|if_tcl\|if_xcmdsrv' 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/\S*\<\%(testdir/\)\@/dev/null $nvim --cmd 'set dir=/tmp' +'%s/^@@.*\n.*For Vim version.*Last change.*\n.*For Vim version.*Last change.*//' +w +q "$file" - # Remove screen dumps, testdir/Make_*.mak files - local na_src_testdir='Make_amiga.mak\|Make_dos.mak\|Make_ming.mak\|Make_vms.mms\|dumps/.*.dump' + # Remove gui, option, setup, screen dumps, testdir/Make_*.mak files + local na_src_testdir='gen_opt_test.vim\|gui_.*\|Make_amiga.mak\|Make_dos.mak\|Make_ming.mak\|Make_vms.mms\|dumps/.*.dump\|setup_gui.vim' 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/testdir/\<\%('"${na_src_testdir}"'\)\>@norm! d/\v(^diff)|%$ ' +w +q "$file" + # Remove testdir/test_*.vim files + local na_src_testdir='balloon.*\|channel.*\|crypt.vim\|gui.*\|job_fails.vim\|json.vim\|mzscheme.vim\|netbeans.*\|paste.vim\|popupwin.*\|restricted.vim\|shortpathname.vim\|tcl.vim\|terminal.*\|xxd.vim' + 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/testdir/\@norm! d/\v(^diff)|%$ ' +w +q "$file" + # Remove version.c #7555 local na_po='version.c' 2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/\<\%('${na_po}'\)\>@norm! d/\v(^diff)|%$ ' +w +q "$file"