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

Re: [PATCH] gitweb: Support for snapshot

From
Junio C Hamano <junkio@cox.net>
Date
Aug 19, 2006, 21:49 UTC
Message-ID
<7vwt941jlp.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<ec76rd$8qf$1@sea.gmane.org>
Jakub Narebski <jnareb@gmail.com> writes:
Show 8 quoted lines
> Below comments to the patch.
>...
> Wouldn't it make it easier to understand code to put %feature hash 
> and gitweb_check_feature subroutine _before_ subroutines for specific
> features?
>
> It would be enough to put:
> $feature{'snapshot'} =  [\&feature_snapshot, 0, undef];

Yes; although actually even 'undef' is not needed, I think it makes sense to have at least one there ;-).

Show 11 quoted lines
> By the way, wouldn't it be better to use _hash_ for mixed meaning
> than _array_? I.e.
>
> our %feature =
> (
>        # feature       => {'sub' => feature-sub, 'override' => allow-override, 'default' => default options...]
>
>        'blame'         => {'sub' => \&feature_blame, 'override' => 0, 'default' => 0},
>    #or 'blame'         => {'sub' => \&feature_blame, 'override' => 0, 'default' => [ 0 ]},
>        'snapshot'      => {'sub' => \&feature_snapshot, 'override' => 0, 'default => [ 'x-gzip', 'gz', 'gzip' ]},
> );

I like it better except that you made it wider than my terminal again making it a lot harder to read.

Previous: Aneesh Kumar K.V
Message 14 of 14 in “gitweb: Support for snapshot”
  1. Aneesh Kumar K.VAug 17, 2006
  2. gitweb: Support for snapshotAneesh Kumar K.V, Aug 18, 2006
  3. Luben TuikovAug 18, 2006
  4. Timo HirvonenAug 18, 2006
  5. Aneesh KumarAug 19, 2006
  6. Junio C HamanoAug 19, 2006
  7. Jakub NarebskiAug 19, 2006
  8. Jakub NarebskiAug 19, 2006
  9. Aneesh Kumar K.VAug 19, 2006
  10. Aneesh Kumar K.VAug 19, 2006
  11. Jakub NarebskiAug 19, 2006
  12. Aneesh Kumar K.VAug 19, 2006
  13. Aneesh Kumar K.VAug 19, 2006
  14. Junio C HamanoAug 19, 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.