fix(vim-patch.sh -m): Show all commits touching a file, not just the first

[skip ci]
This commit is contained in:
James McCoy
2021-05-11 21:28:54 -04:00
parent 216bfa1d6b
commit 86d35bef13

View File

@@ -593,18 +593,20 @@ list_missing_previous_vimpatches_for_patch() {
if [[ -z "${vim_tag}" ]]; then if [[ -z "${vim_tag}" ]]; then
printf 'NOTE: "%s" is not a Vim tag - listing all oldest missing patches\n' "${for_vim_patch}" >&2 printf 'NOTE: "%s" is not a Vim tag - listing all oldest missing patches\n' "${for_vim_patch}" >&2
fi fi
for fname in "${fnames[@]}"; do for fname in "${fnames[@]}"; do
i=$(( i+1 )) i=$(( i+1 ))
printf '[%.*d/%d] %s: ' "${#n}" "$i" "$n" "$fname" printf '[%.*d/%d] %s: ' "${#n}" "$i" "$n" "$fname"
local -a missing_vim_patches=()
_set_missing_vimpatches 1 -- "${fname}" _set_missing_vimpatches 1 -- "${fname}"
set +u # Avoid "unbound variable" with bash < 4.4 below. set +u # Avoid "unbound variable" with bash < 4.4 below.
for missing_vim_commit_info in "${missing_vim_patches[@]}"; do for missing_vim_commit_info in "${missing_vim_patches[@]}"; do
if [[ -z "${missing_vim_commit_info}" ]]; then if [[ -z "${missing_vim_commit_info}" ]]; then
if [[ -z "${missing_vim_commit_info}" ]]; then printf -- "-\r"
else else
printf -- "-\r" printf -- "-\r"
local missing_vim_commit="${missing_vim_commit_info%%:*}"
if [[ -z "${vim_tag}" ]] || [[ "${missing_vim_commit}" < "${vim_tag}" ]]; then if [[ -z "${vim_tag}" ]] || [[ "${missing_vim_commit}" < "${vim_tag}" ]]; then
printf -- "%s\n" "$missing_vim_commit_info" printf -- "%s\n" "$missing_vim_commit_info"
missing_list+=("$missing_vim_commit_info") missing_list+=("$missing_vim_commit_info")