Re: git-show-refs (was: [PATCH/RFC] gitweb: Great subroutines renaming)
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Aug 8, 2006, 18:12 UTC
- Message-ID
- <ebak5n$etr$1@sea.gmane.org>
- In-Reply-To
- <7vejvsyum8.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
> +<format>:: > + A string that interpolates `%(field name)` from the > + object pointed at by a ref being shown. When > + unspecified, `%(name)` is used.
Wouldn't it be better to (re)use notation of rpm's --query-format, i.e. use %{name}, or %30{name}, or %-30{name} for single scalar values, use :typetag output formats, like ':date' (Use strftime(3) "%c" format.) and ':day' (Use strftime(3) "%a %b %d %Y" format.) for epoch/timestamp field, use square brackets for iterating over multivalue output, e.g. "[parent: %{parent}]" for writing out all parents, etc.
Perhaps we could even borrow some code...
-- Jakub Narebski Warsaw, Poland ShadeHawk on #git