git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.

Previous: Jakub Narebski
Message 2 of 2 in “gitweb: Make git_print_log generic; git_print_simplified_log uses it”
  1. gitweb: Make git_print_log generic; git_print_simplified_log uses itJakub Narebski, Aug 27, 2006
  2. Junio C HamanoAug 27, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.