From a2bb63c182bfb5b2f4888d9528cb25490b3de41f Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sun, 9 Jun 2019 16:01:19 +0200 Subject: [PATCH] vim-patch.sh: improve performance with -l [ci skip] #10165 Down to < 1s now also (without get_vim_sources). --- scripts/vim-patch.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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}"