git/list[1] front-page[2] threads[3] people[4] search[5] about
 

No auto CRLF conversion in Commit Message comments

From
HAHarfoot A.J. <a.j.p.harfoot@soton.ac.uk>
Date
Dec 16, 2015, 15:13 UTC
Message-ID
<FBEAE9E9FAB4174499E31C0F26B4BACD2DED2E66@SRV00048.soton.ac.uk>
Hi there,
I'm new to Git, so apologies if this is already available, but after some searching and experimenting I haven't been able to resolve it.
I am running Git 2.6.4.windows.1 on Windows 7 64 bit.
I have the global configuration variable core.autocrlf=true

When I commit, the commit message template file is loaded into my configured text editor (in this case Windows Notepad), however the comment lines are terminated with LF, not CRLF, and so are not displayed as new lines by Notepad. In the opposite direction, the output of 'git log' redirected to a file has all EOL characters set to LF, when originally entered as CRLF, so automatic conversion is working

I have tried to generate a custom commit message using the commit.template variable, but the commented lines are appended to this file, creating a mixture of EOL characters!
Is there a way to fix this inconsistency?
Cheers,
Andy
-- 
Andy Harfoot

GeoData Institute
University of Southampton
Southampton
SO17 1BJ

Tel:  +44 (0)23 8059 2719
Fax:  +44 (0)23 8059 2849

www.geodata.soton.ac.uk
Next: Johannes Schindelin
Message 1 of 3 in “No auto CRLF conversion in Commit Message comments”
  1. Harfoot A.J.Dec 16, 2015
  2. Johannes SchindelinDec 16, 2015
  3. Andrew HarfootDec 17, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.