Re: [RFC/PATCH 2/2] gitweb: Add an option to show size of blobs in the tree view
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 2, 2007, 00:47 UTC
- Message-ID
- <7vps263gq2.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <200708020158.50343.jnareb@gmail.com>
Jakub Narebski <jnareb@gmail.com> writes:
Show 5 quoted lines
> So you think that ";opt=-l" would be required to have 'tree' view with
> blob (file) sizes, and it would be allowed only if
> gitweb_check_feature('ls-tree-size') is true (or something like that).
> Should we return "Permission denied" or simply ignore "-l" extra option
> if it is prohivited by the config?I would say we should make config show-tree-entry-size (or whatever name) unconditionally give the object size of the tree entry, and drop ";opt=-l in URL" support from the code. In other words, if the site/repo owner wants to show it, it is shown to everybody, otherwise nothing is shown.
Keeping the URL clean and without needless variations would help caching; I do not see major advantage of this feature one way or the other, so if we can keep a tree view of the same object from the same repository the same by removing one user preference, that would be better.