vim-patch.sh: Exclude testdir/ files from src/ file pruning

Without the testdir/ exclusion, all directories under src/ were affected
by this cleanup.  However, testdir/ has its own pruning that happens
later.
This commit is contained in:
James McCoy 2017-09-27 08:20:43 -04:00
parent 542ed5f5d3
commit e6d4b7686c
No known key found for this signature in database
GPG Key ID: DFE691AE331BA3DB

View File

@ -133,7 +133,7 @@ preprocess_patch() {
# 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'
2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/\S*\<\%('${na_src}'\)@norm! d/\v(^diff)|%$ ' +w +q "$file"
2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/\S*\<\%(testdir/\)\@<!\%('${na_src}'\)@norm! d/\v(^diff)|%$ ' +w +q "$file"
# Remove channel.txt, netbeans.txt, os_*.txt, term.txt, todo.txt, version*.txt, tags
local na_doc='channel\.txt\|netbeans\.txt\|os_\w\+\.txt\|term\.txt\|todo\.txt\|version\d\.txt\|tags'