mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Merge pull request #5369 from jamessan/vim-patch-preprocessing
vim-patch: Group alternations in preprocess_patch
This commit is contained in:
commit
7307096c5e
@ -132,15 +132,15 @@ preprocess_patch() {
|
|||||||
# Remove *.proto, Make*, gui_*, some if_*
|
# Remove *.proto, Make*, gui_*, some if_*
|
||||||
local na_src='proto\|Make*\|gui_*'
|
local na_src='proto\|Make*\|gui_*'
|
||||||
na_src="$na_src"'\|if_lua\|if_mzsch\|if_olepp\|if_ole\|if_perl\|if_py\|if_ruby\|if_tcl\|if_xcmdsrv'
|
na_src="$na_src"'\|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*\<\%('${na_src}'\)@norm! d/\v(^diff)|%$
' +w +q "$file"
|
||||||
|
|
||||||
# Remove todo.txt, version*.txt, tags
|
# Remove todo.txt, version*.txt, tags
|
||||||
local na_doc='todo\.txt\|version\d\.txt\|tags'
|
local na_doc='todo\.txt\|version\d\.txt\|tags'
|
||||||
2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/runtime/doc/'${na_doc}'@norm! d/\v(^diff)|%$
' +w +q "$file"
|
2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/runtime/doc/\%('${na_doc}'\)@norm! d/\v(^diff)|%$
' +w +q "$file"
|
||||||
|
|
||||||
# Remove some testdir/Make_*.mak files
|
# Remove some testdir/Make_*.mak files
|
||||||
local na_src_testdir='Make_amiga.mak\|Make_dos.mak\|Make_ming.mak\|Make_vms.mms'
|
local na_src_testdir='Make_amiga.mak\|Make_dos.mak\|Make_ming.mak\|Make_vms.mms'
|
||||||
2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/testdir/'${na_src_testdir}'@norm! d/\v(^diff)|%$
' +w +q "$file"
|
2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/testdir/\%('${na_src_testdir}'\)@norm! d/\v(^diff)|%$
' +w +q "$file"
|
||||||
|
|
||||||
# Rename src/ paths to src/nvim/
|
# Rename src/ paths to src/nvim/
|
||||||
LC_ALL=C sed -e 's/\( [ab]\/src\)/\1\/nvim/g' "$file" > "$file".tmp && mv "$file".tmp "$file"
|
LC_ALL=C sed -e 's/\( [ab]\/src\)/\1\/nvim/g' "$file" > "$file".tmp && mv "$file".tmp "$file"
|
||||||
|
Loading…
Reference in New Issue
Block a user