Re: [PATCH] notes: remove trailing whitespace from editor template
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Jun 3, 2025, 20:46 UTC
- Message-ID
- <CAPig+cRTeZosWC=b=9MOjKaUwPodp7P=X2pwuXVgiRorx_+jmg@mail.gmail.com>
- In-Reply-To
- <CALnO6CDgcQCuhxcJLH-XwxB85mxqokxsf04CU4yseTy-=XUWLQ@mail.gmail.com>
On Tue, Jun 3, 2025 at 4:37 PM D. Ben Knoble <ben.knoble@gmail.com> wrote:
Show 22 quoted lines
> On Tue, May 27, 2025 at 1:31 PM Junio C Hamano <gitster@pobox.com> wrote: > > In this case I am not all that sympathetic to the idea of the patch. > > The consistently indented lines makes it more clear from which line > > to which line came from a commit log message; running stripspace > > would break them into paragraph pieces. These editors that complain > > probaly can be fixed? > > My editor doesn't complain, but it does highlight trailing whitespace > at my behest, and it tends to be an eyesore (on purpose: that way I > clean it up). Perhaps Kistoffer is coming from a similar place? > > > Alternatively, if it bothers users of certain editing environments > > too much, perhaps the indent code in the output phase of "git show" > > should lose the indents for empty lines uniformly, shoudln't it? It > > probably should be a fairly isolated change, like the way how the > > expand_tabs_in_log bit is handled in pretty.c; give another bit and > > teach pp_handle_indent to return when that bit is set and the > > payload it was asked to show with indentation is empty, or something > > like that. > > I think this suggestion would also help folks who "git commit -v," > which IIRC is also indented in the template.
For what it's worth, there was a previous attempt at something along these lines after which a discussion ensued.
https://lore.kernel.org/git/20210830072118.91921-4-sunshine@sunshineco.com/T/