Re: Git trailing blank lines feature configuration
Junio C Hamano <[email protected]> Fri, 31 Jul 2026 08:50:26 -0700
| Newsgroups | org.kernel.vger.git |
|---|---|
| Message-ID | <[email protected]> |
Thomas Nemeth <[email protected]> writes: > 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.