aboutsummaryrefslogtreecommitdiff
path: root/scripts/vim-patch.sh
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2017-04-05 22:39:40 -0400
committerJames McCoy <jamessan@jamessan.com>2017-04-05 22:39:40 -0400
commitbb54d921aaf85f0393c1ba10585560056f7f4ec8 (patch)
tree316ff7424337b3572b58340383eeabb3a0d36e80 /scripts/vim-patch.sh
parent4f69a8fb8854698adb2de8956ad0d86ff35a6f68 (diff)
parent210b013ce75b5ea8a897071e32decc1e1f88189e (diff)
downloadrneovim-bb54d921aaf85f0393c1ba10585560056f7f4ec8.tar.gz
rneovim-bb54d921aaf85f0393c1ba10585560056f7f4ec8.tar.bz2
rneovim-bb54d921aaf85f0393c1ba10585560056f7f4ec8.zip
Merge remote-tracking branch 'origin/master' into vim-7.4.2170
Diffstat (limited to 'scripts/vim-patch.sh')
-rwxr-xr-xscripts/vim-patch.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/vim-patch.sh b/scripts/vim-patch.sh
index bf4b7d9080..c8ae36cc3b 100755
--- a/scripts/vim-patch.sh
+++ b/scripts/vim-patch.sh
@@ -109,7 +109,7 @@ assign_commit_details() {
local strip_commit_line=true
else
# Interpret parameter as commit hash.
- vim_version="${1:0:7}"
+ vim_version="${1:0:12}"
vim_commit=$(cd "${VIM_SOURCE_DIR}" \
&& git log -1 --format="%H" "${vim_version}")
local strip_commit_line=false
@@ -136,9 +136,12 @@ preprocess_patch() {
2>/dev/null $nvim --cmd 'set dir=/tmp' +'g@^diff --git a/src/\S*\<\%('${na_src}'\)@norm! d/\v(^diff)|%$ ' +w +q "$file"
# Remove channel.txt, netbeans.txt, os_*.txt, todo.txt, version*.txt, tags
- local na_doc='channel\.txt\|netbeans\.txt\|os_\w\+\.txt\|todo\.txt\|version\d\.txt\|tags$'
+ local na_doc='channel\.txt\|netbeans\.txt\|os_\w\+\.txt\|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"
+ # Remove "Last change ..." changes in doc files.
+ 2>/dev/null $nvim --cmd 'set dir=/tmp' +'%s/^@@.*\n.*For Vim version.*Last change.*\n.*For Vim version.*Last change.*//' +w +q "$file"
+
# Remove some testdir/Make_*.mak files
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"
@@ -318,7 +321,7 @@ list_vim_patches() {
if [[ -n "${vim_tag}" ]]; then
local patch_number="${vim_tag:5}" # Remove prefix like "v7.4."
# Tagged Vim patch, check version.c:
- is_missing="$(sed -n '/static int included_patches/,/}/p' "${NVIM_SOURCE_DIR}/src/nvim/version.c" |
+ is_missing="$(sed -n '/static const int included_patches/,/}/p' "${NVIM_SOURCE_DIR}/src/nvim/version.c" |
grep -x -e "[[:space:]]*//[[:space:]]${patch_number} NA.*" -e "[[:space:]]*${patch_number}," >/dev/null && echo "false" || echo "true")"
vim_commit="${vim_tag#v}"
if (cd "${VIM_SOURCE_DIR}" && git --no-pager show --color=never --name-only "v${vim_commit}" 2>/dev/null) | grep -q ^runtime; then