Re: [PATCH 1/6] templates: Use heredoc in pre-commit hook
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:58:10
Richard Hartmann [off-list ref] writes:
On Sun, Jul 14, 2013 at 9:20 PM, Junio C Hamano [off-list ref] wrote:quoted
Shells on modern distros and platforms have "echo" built-in, so this patch replaces series of writes internal to the shell with a fork to cat with heredoc (which often is implemented with a temporary file).True; fwiw, I replaced my one single echo with heredoc as you suggested I do that. I don't mind undoing that, or I can drop it from this series altogether.
The _real_ reason you wanted to do this change in the context of this series is to make it easier to reword the messages and also have the messages span the full width of the source line, to match the expected output better, isn't it? Git is not _only_ about performance, so even if using "cat <<here" might make things slower (I do not think it is measurable), that reason "this way, it is easier to see how the output given to the users would look like" may well justify this change. I just wanted to see the proposed log message state the real reason, not a performance justification that can be invalidated. Thanks.