From 86d35bef13496e7730a2cce7eabe0190c299f4b4 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Tue, 11 May 2021 21:28:54 -0400 Subject: [PATCH] fix(vim-patch.sh -m): Show all commits touching a file, not just the first [skip ci] --- scripts/vim-patch.sh | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/scripts/vim-patch.sh b/scripts/vim-patch.sh index f583b2fdea..f61737b530 100755 --- a/scripts/vim-patch.sh +++ b/scripts/vim-patch.sh @@ -593,18 +593,20 @@ list_missing_previous_vimpatches_for_patch() { _set_missing_vimpatches 1 -- "${fname}" set +u # Avoid "unbound variable" with bash < 4.4 below. - local missing_vim_commit_info="${missing_vim_patches[0]}" - if [[ -z "${missing_vim_commit_info}" ]]; then - printf -- "-\n" - else - local missing_vim_commit="${missing_vim_commit_info%%:*}" - if [[ -z "${vim_tag}" ]] || [[ "${missing_vim_commit}" < "${vim_tag}" ]]; then - printf -- "%s\n" "$missing_vim_commit_info" - missing_list+=("$missing_vim_commit_info") + for missing_vim_commit_info in "${missing_vim_patches[@]}"; do + if [[ -z "${missing_vim_commit_info}" ]]; then + printf -- "-\r" else - printf -- "-\n" + printf -- "-\r" + local missing_vim_commit="${missing_vim_commit_info%%:*}" + if [[ -z "${vim_tag}" ]] || [[ "${missing_vim_commit}" < "${vim_tag}" ]]; then + printf -- "%s\n" "$missing_vim_commit_info" + missing_list+=("$missing_vim_commit_info") + else + printf -- "-\r" + fi fi - fi + done set -u done