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

Re: gitweb showing slash r at the end of line

From
Jakub Narebski <jnareb@gmail.com>
Date
Jan 30, 2012, 09:23 UTC
Message-ID
<m3obtlczmu.fsf@localhost.localdomain>
In-Reply-To
<1327910140526-7235866.post@n2.nabble.com>
Ondra Medek <xmedeko@gmail.com> writes:
> I have read "SubmittingPatches". I have made a path by "git format-patch -M"
> and I have though it's enough. The problem maybe was, that I had not
> included "Subject: " from the result of "git format-patch -M". Next time I
> will try to do it better.

The problem is that in place of proper commit message, describing change for posteriority as described in SubmittingPatches, you have an email describing why you created this commit:

OM> Hi,
OM> we have gitweb running on Linux box. Some files have Windows line ending
OM> (CRLF) end we do not use core.autcrlf translation. gitweb show the last \r
OM> in the end of each line, which is annoying. I have creates a simple patch to
OM> avoid this. It adds just one line. I am not sure if the regexp should
OM> contain 'g' switch in the end. Also, not sure if there shoul be some config
OM> option to switch on/off this?
OM> 
OM> Cheers
OM> Ondra
 
Take a look how other commit messages are written in git.git, and
please remember to sign off your patches.
Show 5 quoted lines
> I am a Git newbie, but my bare repos have "config" file and this file can
> contain the "core.autocrlf" setting. So the gitweb can read it. Or what
> about to have a special section [gitweb] in this config? For now, the gitweb
> config files are somewhat "scattered" = "descrition", "cloneurl",
> "project.list", ...
The [gitweb] section contains stuff that can be used instead of
individual files like 'description' ('gitweb.description' can be used
instead if that file is not present), and also to configure
overridable features on per-repository basis, like 'gitweb.snapshot'.
 
Show 5 quoted lines
> Yeah, the autodetection of mixed mode line endings could be the best
> solution.
> 
> However, from my point of view a global gitweb setting would be enough for
> now.

I think that if not using autodetection this should be made into proper gitweb %feature, e.g. named 'eol' - this automatically gives ability to override it on per-repository basis via repo config.

-- 
Jakub Narebski
Previous: Ondra MedekNext: Ondra Medek
Message 6 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.