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

Re: Verbose Commit Ignore Line Fails via CRLF Line Endings

From
Spencer Fretwell <spencer.fretwell@gmail.com>
Date
Oct 8, 2024, 18:37 UTC
Message-ID
<CABa71BwtEWS79CZwPOa_Nrh1iMrXRo+hyxNBc5F8GsQiwjdapw@mail.gmail.com>
In-Reply-To
<CABa71ByU_9g_6OgJ9PsoQ99oyMspucTBqO-RkB_2W4smTr2RNw@mail.gmail.com>

On second glance it might involve having a file being committed that has CRLF endings in it. Committing files with LF only does not produce issue.

I suspect git either needs to add support for a magic ignore line ending with a CRLF, or has to sanitize verbose output when that output has CRLF (less ideal)

Bug originally seen as early as [2018](https://superuser.com/questions/1367811/sometimes-git-includes-the-diff-to-commit-message-when-using-verbose)

On Tue, Oct 8, 2024 at 12:30 PM Spencer Fretwell <spencer.fretwell@gmail.com> wrote:

Show 10 quoted lines
>
> gc -v produces CRLF file which does not ignore verbose description.
>
> OSX + git-annex (pre-commit hook disabled just in case)
> using subl -w (sublime text 4) as editor, which indicated the change
> in line endings
> - committing as Unix fixes the issue (workaround, tedious)
> - leaving as Windows is the issue
>
> see attached bugreport
Previous: Spencer FretwellNext: brian m. carlson
Message 2 of 9 in “Verbose Commit Ignore Line Fails via CRLF Line Endings”
  1. Spencer FretwellOct 8, 2024
  2. Spencer FretwellOct 8, 2024
  3. brian m. carlsonOct 8, 2024
  4. Spencer FretwellOct 8, 2024
  5. brian m. carlsonOct 8, 2024
  6. Torsten BögershausenOct 11, 2024
  7. Junio C HamanoOct 11, 2024
  8. brian m. carlsonOct 8, 2024
  9. Torsten BögershausenOct 11, 2024

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.