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

Re: Verbose Commit Ignore Line Fails via CRLF Line Endings

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Oct 8, 2024, 19:02 UTC
Message-ID
<ZwWBxy-wx6bn5tYz@tapette.crustytoothpaste.net>
In-Reply-To
<CABa71ByU_9g_6OgJ9PsoQ99oyMspucTBqO-RkB_2W4smTr2RNw@mail.gmail.com>
On 2024-10-08 at 18:30:53, Spencer Fretwell wrote:
> gc -v produces CRLF file which does not ignore verbose description.

I'm not sure what software you're suggesting here, but we don't distribute any software called "gc". I can't imagine `git gc` is affecting anything here. Is this maybe an alias for `git commit` or something else? (I'm going to assume so below.) If so, do you see the problem with a plain `git commit -v`?

Show 7 quoted lines
> 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
Show 12 quoted lines
> Thank you for filling out a Git bug report!
> Please answer the following questions to help us understand your issue.
> 
> What did you do before the bug happened? (Steps to reproduce your issue)
> 
> - gc -v
> 
> What did you expect to happen? (Expected behavior)
> 
> - line endings respect OS
> - gc without -v uses Unix line endings
> - line ending is visible in sublime (editor = subl -w)

Does this happen if you use a different editor as well, such as vi or nano? I don't see this on a Linux system with `git commit -v` using Neovim.

Also, if you do see this problem when you open the editor, can you leave the editor as it is (don't save or modify the file), and change into another terminal window and use something like `xxd -g` or `od -tx1` to see if `.git/COMMIT_EDITMSG` has CRLF pairs (that should show up as `0d 0a`) or just LF (plain `0a`)?

The reason I ask this is that I'm wondering if maybe there's a configuration of your editor that's causing it to switch into a special diff mode with `git commit -v` that it thinks should have CRLF endings.

-- 
brian m. carlson (they/them or he/him)
Toronto, Ontario, CA
Previous: Junio C HamanoNext: Torsten Bögershausen
Message 8 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.