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

Re: gitweb: how to name main "action" subroutines?

From
JWJosef Weidendorfer <josef.weidendorfer@gmx.de>
Date
Jul 31, 2006, 20:41 UTC
Message-ID
<200607312241.02711.Josef.Weidendorfer@gmx.de>
In-Reply-To
<ealj3h$to2$1@sea.gmane.org>
On Monday 31 July 2006 20:45, Jakub Narebski wrote:
Show 14 quoted lines
> Josef Weidendorfer wrote:
> 
> > On Monday 31 July 2006 16:03, you wrote:
> >> I'm going to rename some gitweb subroutines to better correspond to what
> >> given subroutine does. I have problem: how to name main "action"
> >> subroutines? Currently they use git_ prefix, e.g. git_logo.
> >> git_project_list, git_rss, git_summary, git_heads,...
> > 
> > print_* or write_* ?
> > At least, the functions print/write the HTML code to stdout of the script.
> 
> The problem is that there are subroutines which print _fragments_ of HTML
> code (like git_header_html or git_print_page_path) which would use probably
> print_ prefix. Action subroutines output always whole page.

Why not "print_*_page", if they print out a whole page? I would "git_header_html" rename to "print_header"; it's clear that it prints out HTML ;-) And "git_print_page_path" only needs stripping of "git_" prefix.

Josef
Previous: Jakub Narebski
Message 6 of 6 in “gitweb: how to name main "action" subroutines?”
  1. Jakub NarebskiJul 31, 2006
  2. Luben TuikovJul 31, 2006
  3. Jakub NarebskiJul 31, 2006
  4. Josef WeidendorferJul 31, 2006
  5. Jakub NarebskiJul 31, 2006
  6. Josef WeidendorferJul 31, 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.