Thread (3 messages) flat view 3 messages, 2 authors, 2016-08-11

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

From: Jakub Narebski <hidden>
Date: 2016-08-11 20:36:59

Jakub Narebski wrote:
Junio C Hamano wrote:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help