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

Re: gitweb showing slash r at the end of line

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 27, 2012, 23:15 UTC
Message-ID
<7vvcnwybxj.fsf@alter.siamese.dyndns.org>
In-Reply-To
<m3aa58eskw.fsf@localhost.localdomain>
Jakub Narebski <jnareb@gmail.com> writes:
Show 10 quoted lines
> Ondra Medek <xmedeko@gmail.com> writes:
>
>> we have gitweb running on Linux box. Some files have Windows line ending
>> (CRLF) end we do not use core.autcrlf translation. gitweb show the last \r
>> in the end of each line, which is annoying.
>
> Well, this "\r" allows to recognize when file with Windows line ending
> (CRLF) made it into repository... which usually is discouraged.  But
> if you allow this, I can understand that those "\r" at the end of
> every line can be annoying.
I think the right thing to do is:
 * If the repository data is _supposed_ to have CRLF endings (e.g. check
   with core.crlf or something), strip \r and do not show them.
 * Otherwise, i.e. if the repository data is supposed _not_ to have CRLF
   endings, do show these '\r'.  Annoyance here is a *feature* to remind
   the viewer that the contents needs _fixing_.
 * No other switches.
Previous: Jakub NarebskiNext: Jakub Narebski
Message 3 of 8 in “gitweb showing slash r at the end of line”
  1. Ondra MedekJan 27, 2012
  2. Jakub NarebskiJan 27, 2012
  3. Junio C HamanoJan 27, 2012
  4. Jakub NarebskiJan 28, 2012
  5. Ondra MedekJan 30, 2012
  6. Jakub NarebskiJan 30, 2012
  7. Ondra MedekJan 30, 2012
  8. Jakub NarebskiFeb 2, 2012

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.