Re: [PATCH/RFC] gitweb: Make git_print_log generic; git_print_simplified_log uses it
- From
Junio C Hamano <junkio@cox.net>
- Date
- Aug 27, 2006, 23:11 UTC
- Message-ID
- <7v4pvxvknc.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <200608272355.07625.jnareb@gmail.com>
Jakub Narebski <jnareb@gmail.com> writes:
Show 5 quoted lines
> The RFC is about style of git_print_log function. Is it a good idea > and good implementation to pass miscelaneus options as hash values > instead of using fixed order of parameters, and passing 1 or undef? > Is it a good naming of parameters like '-remove_title', or would > 'remove_title' or 'remove-title' be better?
I do not personally like the line-noise sub prototypes, since I have not seen it buys you much in real programs. Although some cute hacks like rolling your own control structure lookalikes cannot be done without them, they are just that -- cute hacks -- and tends to obfuscate what is really happening behind the scene (not that writing anything in Perl is not already obfuscating things ;-)). But maybe it is just me.
I think you already use CGI.pm and the argument passing style using things like "-remove_title" is the norm there, so I do not have objections against it. You might even be able to lift the code CGI.pm uses to implement the hash-style passing with defaults.