Re: [PATCH 2/2] commit: fix ending newline for template files

2015-05-30 Thread Junio C Hamano
Eric Sunshine sunsh...@sunshineco.com writes: On Fri, May 29, 2015 at 4:17 PM, Junio C Hamano gits...@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

Re: [PATCH 2/2] commit: fix ending newline for template files

2015-05-30 Thread Eric Sunshine
On Sat, May 30, 2015 at 7:29 AM, Patryk Obara patryk.ob...@gmail.com wrote: On Thu, May 28, 2015 at 4:29 PM, Eric Sunshine sunsh...@sunshineco.com wrote: Did you consider the alternate approach of handling newline processing immediately upon loading 'logfile' and 'template_file', rather than

Re: [PATCH 2/2] commit: fix ending newline for template files

2015-05-30 Thread Patryk Obara
@Eric, Junio Thank you a lot for feedback - should I post new set of patches as new thread with new cover letter, or reply to first mail in this thread? On Thu, May 28, 2015 at 4:29 PM, Eric Sunshine sunsh...@sunshineco.com wrote: Did you consider the alternate approach of handling newline

Re: [PATCH 2/2] commit: fix ending newline for template files

2015-05-29 Thread Eric Sunshine
On Fri, May 29, 2015 at 4:17 PM, Junio C Hamano gits...@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

Re: [PATCH 2/2] commit: fix ending newline for template files

2015-05-29 Thread Junio C Hamano
Eric Sunshine sunsh...@sunshineco.com writes: On Thu, May 28, 2015 at 2:22 PM, Junio C Hamano gits...@pobox.com wrote: Eric Sunshine sunsh...@sunshineco.com writes: Moreover, it lacks justification and explanation of why you consider the cleanup unnecessary. History [1] indicates that its

Re: [PATCH 2/2] commit: fix ending newline for template files

2015-05-28 Thread Junio C Hamano
Eric Sunshine sunsh...@sunshineco.com writes: Moreover, it lacks justification and explanation of why you consider the cleanup unnecessary. History [1] indicates that its application to -F but not -t was intentional. [1]: bc92377 (commit: fix ending newline for template files, 2015-05-26)

Re: [PATCH 2/2] commit: fix ending newline for template files

2015-05-28 Thread Eric Sunshine
On Thu, May 28, 2015 at 2:22 PM, Junio C Hamano gits...@pobox.com wrote: Eric Sunshine sunsh...@sunshineco.com writes: Moreover, it lacks justification and explanation of why you consider the cleanup unnecessary. History [1] indicates that its application to -F but not -t was intentional.

Re: [PATCH 2/2] commit: fix ending newline for template files

2015-05-28 Thread Eric Sunshine
On Tue, May 26, 2015 at 2:15 AM, Patryk Obara patryk.ob...@gmail.com wrote: git-commit with -t or -F -e uses content of user-supplied file as initial value for commit msg in editor. There is no guarantee, that this file ends with newline - it depends on file content and editor used to create

[PATCH 2/2] commit: fix ending newline for template files

2015-05-26 Thread Patryk Obara
git-commit with -t or -F -e uses content of user-supplied file as initial value for commit msg in editor. There is no guarantee, that this file ends with newline - it depends on file content and editor used to create file (some editors append and hide last newline from user while others do not).