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

Re: Git trailing blank lines feature configuration

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 31, 2026, 15:50 UTC
Message-ID
<xmqqy0ercg59.fsf@gitster.g>
In-Reply-To
<6022080.DvuYhMxLoT@cixi>
Thomas Nemeth <tnemeth@free.fr> writes:
Show 16 quoted lines
>     Hi !
>
>     I have the habit to keep 1 blank line at the end of my files. To me,
>     it eases the EOF modifications (selecting code blocks, pasting them)
>     in vim.
>
>     Note that I still want to remove blanks at EOL. But I'd like to keep
>     1 blank trailing line. I still can, of course, but the diff still
>     shows me a red "+"...
>
>     Would it be possible to have a configuration option to avoid warnings
>     (because I see that as a warning) about trailing blank lines ?
>
>     Thanks
>
> Thomas.
Would it be possible with the current system?  No.

Would it be possible to add such a new feature? If designed well, perhaps.

Things to consider (though not exhaustive) include:
 - What mechanism should this modify?
 - What should the new option be called?
 - Do we only need to accommodate those who want one trailing blank
   line?  What about those who want two?  Three?
Thanks.
Previous: Thomas Nemeth
Message 10 of 10 in “Git trailing blank lines feature configuration”
  1. Thomas NemethJul 31, 2026
  2. Johannes SixtJul 31, 2026
  3. Thomas NemethJul 31, 2026
  4. Ben KnobleAug 1, 2026
  5. Thomas NemethAug 1, 2026
  6. Johannes SixtAug 1, 2026
  7. Thomas NemethAug 2, 2026
  8. Junio C HamanoJul 31, 2026
  9. Thomas NemethAug 1, 2026
  10. Junio C HamanoJul 31, 2026

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.