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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jakub Narebski wrote:
> 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
Poland
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]