fix(vim-patch.sh): 'vim-patch:<hash>' token for 'non-patch' commits #36534

Vim may tag runtime-only commits without the 2-liner version.c change.
Inspect both tag and commit message to "guess" if it the patch
should go to version.c or not.
This commit is contained in:
Jan Edmund Lazo
2025-11-12 23:46:22 -05:00
committed by GitHub
parent 4dd9137215
commit d2517acdc5

View File

@@ -911,10 +911,12 @@ is_na_patch() {
list_na_patches() { list_na_patches() {
list_missing_vimpatches 0 | while read -r patch; do list_missing_vimpatches 0 | while read -r patch; do
if is_na_patch "$patch"; then if is_na_patch "$patch"; then
if (echo "$patch" | grep -q '^v[0-9]'); then GIT_MSG="$(git -C "${VIM_SOURCE_DIR}" log -1 --oneline "$patch")"
echo "vim-patch:$(git -C "${VIM_SOURCE_DIR}" log -1 --pretty=format:%s "$patch" | sed 's/^patch //')" if (echo "$patch" | grep -q '^v[0-9]\.[0-9]\.[0-9]') && (echo "${GIT_MSG}" | grep -q ' patch [0-9]\.'); then
# shellcheck disable=SC2001
echo "vim-patch:$(echo "${GIT_MSG}" | sed 's/^[0-9a-zA-Z]\+ patch //')"
else else
echo "vim-patch:$(git -C "${VIM_SOURCE_DIR}" log -1 --oneline "$patch")" echo "vim-patch:${GIT_MSG}"
fi fi
fi fi
done done