summaryrefslogtreecommitdiffstatshomepage
path: root/scripts
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2026-01-10 08:07:58 +0800
committerGitHub <noreply@github.com>2026-01-10 08:07:58 +0800
commitd1f7672bc9c39bad8000bcf2e2ec6feff8787986 (patch)
treeb5fe08f050d7dc70d3050f801a82df62d26f11b5 /scripts
parentaee7c1feac01d062cf1fddab448e0fe3ddd1f491 (diff)
vim-patch:fc00006: runtime(sieve): preserve existing line endings in ftplugin (#37334)
Only set fileformat=dos for new files; preserve existing line endings when editing. This satisfies RFC 5228 for new files while avoiding issues with version control and existing workflows. The previous change (3cb4148) unconditionally set fileformat=dos, which converts existing files with LF line endings to CRLF on save. This causes issues with version control (entire file appears changed) and breaks workflows where sieve files are stored with unix line endings. Dovecot Pigeonhole (the main sieve implementation) has explicitly accepted LF line endings since 2008 (commit 97b967b5): /* Loose LF is allowed (non-standard) and converted to CRLF */ This behavior has remained unchanged for almost 18 years. closes: vim/vim#19144 https://github.com/vim/vim/commit/fc00006777594f969ba8fcff676e6ca1bcb43546 Co-authored-by: André-Patrick Bubel <code@apb.name> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/vim-patch.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/vim-patch.sh b/scripts/vim-patch.sh
index f7c2d72718..5e4848f365 100755
--- a/scripts/vim-patch.sh
+++ b/scripts/vim-patch.sh
@@ -179,10 +179,10 @@ assign_commit_details() {
local vim_coauthor0
vim_coauthor0="$(git -C "${VIM_SOURCE_DIR}" log -1 --pretty='format:Co-authored-by: %an <%ae>' "${vim_commit}")"
# Extract co-authors from the commit message.
- vim_coauthors="$(echo "${vim_message}" | (grep -E '^Co-authored-by: ' || true) | (grep -Fxv "${vim_coauthor0}" || true))"
+ vim_coauthors="$(echo "${vim_message}" | (grep -E '^Co-[Aa]uthored-[Bb]y: ' || true) | (grep -Fxv "${vim_coauthor0}" || true))"
vim_coauthors="$(echo "${vim_coauthor0}"; echo "${vim_coauthors}")"
# Remove Co-authored-by and Signed-off-by lines from the commit message.
- vim_message="$(echo "${vim_message}" | grep -Ev '^(Co-authored|Signed-off)-by: ')"
+ vim_message="$(echo "${vim_message}" | grep -Ev '^(Co-[Aa]uthored|Signed-[Oo]ff)-[Bb]y: ')"
if [[ ${munge_commit_line} == "true" ]]; then
# Remove first line of commit message.
vim_message="$(echo "${vim_message}" | sed -Ee '1s/^patch /vim-patch:/')"