summaryrefslogtreecommitdiffstatshomepage
path: root/scripts
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2025-11-12 23:46:22 -0500
committerGitHub <noreply@github.com>2025-11-12 20:46:22 -0800
commitd2517acdc5fb16ff7aff038d421622322f20ecd6 (patch)
treeb8b999d21948e1707424b1e1873eb9fca19dfd65 /scripts
parent4dd9137215f88bb6eabe386a7e474c59783a6486 (diff)
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.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/vim-patch.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/vim-patch.sh b/scripts/vim-patch.sh
index 171910367c..eda530e10a 100755
--- a/scripts/vim-patch.sh
+++ b/scripts/vim-patch.sh
@@ -911,10 +911,12 @@ is_na_patch() {
list_na_patches() {
list_missing_vimpatches 0 | while read -r patch; do
if is_na_patch "$patch"; then
- if (echo "$patch" | grep -q '^v[0-9]'); then
- echo "vim-patch:$(git -C "${VIM_SOURCE_DIR}" log -1 --pretty=format:%s "$patch" | sed 's/^patch //')"
+ GIT_MSG="$(git -C "${VIM_SOURCE_DIR}" log -1 --oneline "$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
- echo "vim-patch:$(git -C "${VIM_SOURCE_DIR}" log -1 --oneline "$patch")"
+ echo "vim-patch:${GIT_MSG}"
fi
fi
done