Skip to content

Commit 5958b8d

Browse files
committed
Turn off line ending conversion for .commit-template
When committing a change, the automatically generated git commit message consists of 1) The content of .commit-template 2) Informative text for the current commit, generated by git. While 2) always has LF line endings, even on Windows, 1) might have CRLF line endings if core.autocrlf=true. The result is a text with mixed line endings. With the default editor vim, every line of the commit template part ends with ^M. Fix this by forcing the line endings of .commit-template to be LF regardless of core.autocrlf. Change-Id: I6db825695466d7f48f1fa4f771d83fb872fdb576 Reviewed-by: Simon Hausmann <[email protected]> Reviewed-by: Oliver Wolff <[email protected]> Reviewed-by: Oswald Buddenhagen <[email protected]>
1 parent c9d5341 commit 5958b8d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: .gitattributes

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.tag export-subst
22
.gitignore export-ignore
33
.gitattributes export-ignore
4-
.commit-template export-ignore
4+
.commit-template export-ignore eol=lf
55
init-repository export-ignore
66
README.git export-ignore

0 commit comments

Comments
 (0)