diff options
| author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2025-11-12 23:46:22 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-12 20:46:22 -0800 |
| commit | d2517acdc5fb16ff7aff038d421622322f20ecd6 (patch) | |
| tree | b8b999d21948e1707424b1e1873eb9fca19dfd65 /scripts | |
| parent | 4dd9137215f88bb6eabe386a7e474c59783a6486 (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-x | scripts/vim-patch.sh | 8 |
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 |
