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

Re: [PATCH 1/2] gitweb: allow access to forks with strict_export

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 13, 2008, 22:31 UTC
Message-ID
<7vr64b4sib.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<m3prjvg2st.fsf@localhost.localdomain>
Jakub Narebski <jnareb@gmail.com> writes:
Show 14 quoted lines
> Matt McCutchen <matt@mattmccutchen.net> writes:
>
> CC-ed Petr Baudis, author of forks support in gitweb.
>
>> git_get_projects_list excludes forks in order to unclutter the main
>> project list, but this caused the strict_export check, which also relies
>> on git_get_project_list, to incorrectly fail for forks.  This patch adds
>> an argument so git_get_projects_list knows when it is being called for a
>> strict_export check (as opposed to a user-visible project list) and
>> doesn't exclude the forks.
>>
>> Signed-off-by: Matt McCutchen <matt@mattmccutchen.net>
>
> Looks good for me.
That sounds like a broken API to me.

At least, please have the decency to not call the extra parameter "for strict export". I would understand it if the extra parameter is called "toplevel_only" (or its negation, "include_forks").

IOW, don't name a parameter after the name of one caller that happens to want an unspecified special semantics, without saying what that special semantics is. Instead, name it after the special semantics that the argument triggers.

Previous: Jakub NarebskiNext: Jakub Narebski
Message 3 of 7 in “gitweb: allow access to forks with strict_export”
  1. 1/2 gitweb: allow access to forks with strict_exportMatt McCutchen, Dec 13, 2008
  2. Jakub NarebskiDec 13, 2008
  3. Junio C HamanoDec 13, 2008
  4. Jakub NarebskiDec 13, 2008
  5. Matt McCutchenDec 14, 2008
  6. Jakub NarebskiDec 20, 2008
  7. Matt McCutchenDec 14, 2008

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.