mirror of
https://github.com/neovim/neovim.git
synced 2026-04-21 23:05:41 +00:00
scripts/vim-patch.sh: Remove "Last change ..." lines.
Also: - fix ignoring doc/tags file - use 12 chars of hash instead of 7
This commit is contained in:
@@ -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
|
||||
# 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'
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user