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

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

From
Jakub Narebski <jnareb@gmail.com>
Date
Oct 30, 2006, 13:58 UTC
Message-ID
<200610301458.33634.jnareb@gmail.com>
In-Reply-To
<200610301043.22033.jnareb@gmail.com>
Jakub Narebski wrote:
Show 10 quoted lines
> Junio C Hamano wrote:
>>
>> I think the UI layer like gitweb should have freedom to choose
>> its own pathname handling, and should read from -z output.
> 
> That's a very good idea. I'll send separate patch (if noone else will
> do this, that is) which would convert gitweb to always use -z output,
> both git-ls-tree and git-diff-tree... oh, well, there is no -z patch
> output, so in patch part we would have to replace git quoted part by
> gitweb quoted part.

I have realized that it is not as easy as it sounds, at least for the git-diff-tree output. For the LF-terminated output (without '-z') you know that LF separates records, and you can split on LF ('\n'). It is not the case for '-z' '\0' delimited output: NUL ('\0') might also mean end of one of the filenames in the rename/copy case, and is used to separate filename(s) from the score (although here TAB would be enough). And that is probably the case that gitweb uses default git-diff-tree output, and _tries_ to unescape(...) filename.

The solution would be perhaps to add '--zz' option to use '-z' output but to separate records by double NUL, i.e. '\0\0'...

By the way, why diff-tree "raw" format for merge gives only one, final, filename?

-- 
Jakub Narebski
Previous: Jakub NarebskiNext: Junio C Hamano
Message 6 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.