aboutsummaryrefslogtreecommitdiff
path: root/scripts/vim-patch.sh
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2019-06-09 16:01:19 +0200
committerJustin M. Keyes <justinkz@gmail.com>2019-06-09 16:01:18 +0200
commita2bb63c182bfb5b2f4888d9528cb25490b3de41f (patch)
tree25124cb190772adaa3091bd5348e235c4fd1caa9 /scripts/vim-patch.sh
parent0b4c53fc23581abb14b6d4c567dc08720f509020 (diff)
downloadrneovim-a2bb63c182bfb5b2f4888d9528cb25490b3de41f.tar.gz
rneovim-a2bb63c182bfb5b2f4888d9528cb25490b3de41f.tar.bz2
rneovim-a2bb63c182bfb5b2f4888d9528cb25490b3de41f.zip
vim-patch.sh: improve performance with -l [ci skip] #10165
Down to < 1s now also (without get_vim_sources).
Diffstat (limited to 'scripts/vim-patch.sh')
-rwxr-xr-xscripts/vim-patch.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/vim-patch.sh b/scripts/vim-patch.sh
index a9e9c5d6c3..43af437c2b 100755
--- a/scripts/vim-patch.sh
+++ b/scripts/vim-patch.sh
@@ -425,8 +425,13 @@ show_vimpatches() {
get_vim_sources
printf "\nVim patches missing from Neovim:\n"
+ local -A runtime_commits
+ for commit in $(git -C "${VIM_SOURCE_DIR}" log --format="%H %D" -- runtime | sed 's/,\? tag: / /g'); do
+ runtime_commits[$commit]=1
+ done
+
list_missing_vimpatches | while read -r vim_commit; do
- if [ -n "$(git -C "$VIM_SOURCE_DIR" diff-tree --no-commit-id --name-only "${vim_commit}" -- runtime)" ]; then
+ if [[ "${runtime_commits[$vim_commit]-}" ]]; then
printf ' • %s (+runtime)\n' "${vim_commit}"
else
printf ' • %s\n' "${vim_commit}"