Re: [PATCH 2/2] commit: fix ending newline for template files
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 30, 2015, 16:59 UTC
- Message-ID
- <xmqqfv6eatmt.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <CAPig+cTrW9f1TGvpr4KH+EcOsy=FWvGRj6ZQM6nsFyXc15c4qg@mail.gmail.com>
Eric Sunshine <sunshine@sunshineco.com> writes:
Show 20 quoted lines
> On Fri, May 29, 2015 at 4:17 PM, Junio C Hamano <gitster@pobox.com> wrote: >> By default, we should run clean-up after the editor we spawned gives >> us the edited result. Not adding one more LF after the template >> when it already ends with LF would not hurt, but an extra blank >> after the template material does not hurt, either, so I am honestly >> indifferent. > > I had a similar reaction. The one salient bit I picked up was that > Patryk finds it aesthetically offensive[1] when the template ends with > a comment line, and that comment line does not flow directly into the > comment lines provided by --status. That is: > > Template line 1 > # Template line 2 > > # Please enter the commit message... > # with '#' will be ignored... > > [1]: Quoting from the commit message of patch 1/2: "...which is very > annoying when template ends with line starting with '#'"
As I said in the message you are responding to, I do not think it would hurt if we stopped adding an LF after a template that already ends with LF. I think I am OK with a patch that does so without doing anything else, like changing when clean-up happens, etc.