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

Re: [PATCH/RFC (take 2)] gitweb: New improved patchset view

From
Junio C Hamano <junkio@cox.net>
Date
Oct 30, 2006, 08:51 UTC
Message-ID
<7vlkmyw5hx.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<7vy7qyw6w6.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> writes:
Show 16 quoted lines
> Jakub Narebski <jnareb@gmail.com> writes:
>
>> ..., without
>> resolving the strange filenames problem (it would be nice if somebody was
>> to send code; well Junio send patch to address core git filename quoting
>> issue).
>
> Having showed that patch, I do not think it is a good way to go.
>
> I think the UI layer like gitweb should have freedom to choose
> its own pathname handling, and should read from -z output.
>
> The git plumbing is agnostic to the character encoding issues,
> and does not care what character set pathnames are encoded, and
> what character set the file contents are encoded.  These are
> very project specific and should be handled per project.
Side note.

There is one action item for shorter term I realized we would need. We need to make patch-id generation use unquoted filenames, so that no matter how differently we might reimplement quote_c_style() later, we would get the same patch-id from the diff between the same two trees. Currently I think it hashes the quoted filename that appear on ---/+++ lines (and "rename from"/"rename to" lines as well, but usually you do not use -M/-C when computing the patch-id, so these are not really an issue).

I think longer term plan for git should include standardizing on how pathname encoding and content encoding are handled at the UI layer.

And that plan _should_ eventually include the textual diff part. But textual diff has a machine readability requirements, so we need to proceed very carefully. I think the patch I sent out earlier is probably good enough if we only care about utf-8, but would not correctly handle other sane pathname encodings such as extended UNIX code (let alone broken but still widely used encodings such as MS-Kanji aka Shift_JIS).

Previous: Junio C HamanoNext: Jakub Narebski
Message 4 of 9 in “Re: [PATCH/RFC (take 2)] gitweb: New improved patchset view”
  1. Luben TuikovOct 30, 2006
  2. Jakub NarebskiOct 30, 2006
  3. Junio C HamanoOct 30, 2006
  4. Junio C HamanoOct 30, 2006
  5. Jakub NarebskiOct 30, 2006
  6. Jakub NarebskiOct 30, 2006
  7. Junio C HamanoOct 30, 2006
  8. Jakub NarebskiOct 30, 2006
  9. Junio C HamanoOct 30, 2006

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.