git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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!
Previous: Ian HiltNext: Junio C Hamano
Message 8 of 21 in “pre-commit hook should ignore carriage returns at EOL”
  1. pre-commit hook should ignore carriage returns at EOLChristian Holtje, Jun 24, 2008
  2. Alf ClementJun 24, 2008
  3. Ian HiltJun 24, 2008
  4. Jakub NarebskiJun 24, 2008
  5. Ian HiltJun 24, 2008
  6. Jakub NarebskiJun 24, 2008
  7. Ian HiltJun 24, 2008
  8. Christian HoltjeJun 24, 2008
  9. Junio C HamanoJun 24, 2008
  10. Christian HoltjeJun 24, 2008
  11. Jakub NarebskiJun 24, 2008
  12. Junio C HamanoJun 24, 2008
  13. Christian HoltjeJun 25, 2008
  14. Junio C HamanoJun 24, 2008
  15. Ship sample hooks with .sample suffixJunio C Hamano, Jun 25, 2008
  16. Junio C HamanoJun 25, 2008
  17. Johannes SixtJun 25, 2008
  18. Junio C HamanoJun 25, 2008
  19. Johannes SixtJun 26, 2008
  20. Junio C HamanoJun 26, 2008
  21. Peter BaumannJun 25, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.