From 7aaa4a51b76fd136b5373acf8c5a0c7c278d8b5c Mon Sep 17 00:00:00 2001 From: Jongwook Choi Date: Tue, 21 May 2024 12:10:39 -0400 Subject: build(vim-patch.sh): include commit subject #28767 Problem: vim-patch commits lack an informative title and summary in the very first line of the commit message when the vim-revision is a Git SHA hash, unlike when is a Vim version. This makes it difficult to discern at a glance what changes are introduced by such vim-patch commits (in git log, PR title, changelog generated by git-cliff, etc.). BEFORE: vim-patch:abcdef123456 runtime(vim): improve performance ... Solution: Repeat the title of the upstream commit message, to improve the clarity and visibility of the commit message. AFTER: vim-patch:abcdef123456: runtime(vim): improve performance ... Note: the `vim-patch:` token is still needed by `vim-patch.sh` (but not necessarily in the very first line of the commit message) to determine which vim patches have been applied. `` is internally normalized to 7 hex digits. --- scripts/vim-patch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/vim-patch.sh b/scripts/vim-patch.sh index 45dd7f5fee..e8758c064f 100755 --- a/scripts/vim-patch.sh +++ b/scripts/vim-patch.sh @@ -122,7 +122,7 @@ commit_message() { if [[ "${vim_message}" == "vim-patch:${vim_version}:"* ]]; then printf '%s\n\n%s\n\n%s' "${vim_message}" "${vim_commit_url}" "${vim_coauthors}" else - printf 'vim-patch:%s\n\n%s\n\n%s\n\n%s' "$vim_version" "$vim_message" "$vim_commit_url" "$vim_coauthors" + printf 'vim-patch:%s: %s\n\n%s\n\n%s' "${vim_version:0:7}" "${vim_message}" "${vim_commit_url}" "${vim_coauthors}" fi } -- cgit