Re: [PATCH] pre-commit hook should ignore carriage returns at EOL
- From
Christian Holtje <docwhat@gmail.com>
- Date
- Jun 24, 2008, 19:16 UTC
- Message-ID
- <39C2861E-F800-40AE-8C15-4FC3BB51EF16@gmail.com>
- In-Reply-To
- <alpine.LFD.1.10.0806241418360.32759@sys-0.hiltweb.site>
On Jun 24, 2008, at 2:26 PM, Ian Hilt wrote:
> Perhaps you want to use printf "foo\r" instead? echo "foo\r" does not > produce a CR on my system.
...
> Wouldn't it be less redundant to do a test for \s\r$ here instead of > testing for \r$ and then \s\r$?
The code is checking for \r$ and then doing a different space check depending on that, not one after another.
Thanks for the feedback. I'll put up v2 in a second.
Ciao!