From: Giuseppe Bilotta Date: Fri, 26 Jun 2009 23:14:52 GMT Subject: Re: [PATCHv6 4/8] gitweb: (gr)avatar support Message-ID: In-Reply-To: <200906270058.16686.jnareb@gmail.com> On Sat, Jun 27, 2009 at 12:58 AM, Jakub Narebski wrote: > Do I understand this correctly that there is additional patch planned > in new release of this series providing support for gitweb.avatar = picon? Yes. And a separate patch makes the picon the fallback for gravatar too, but I'm thinking about having something like a gitweb.gravatar_default (or something like that) to make that configurable. >>>> +     # To enable system wide have in $GITWEB_CONFIG >>>> +     # $feature{'avatar'}{'default'} = ['gravatar']; >>>> +     # To have project specific config enable override in $GITWEB_CONFIG >>>> +     # $feature{'avatar'}{'override'} = 1; >>>> +     # and in project config gitweb.avatar = gravatar; >>>> +     'avatar' => { >>>> +             'override' => 0, >>>> +             'default' => ['']}, > > NOTE, NOTE, NOTE! > > One thing I forgot about (and would be discovered when running t9500 > with provided patch... among other errors) is that you need to provide > 'sub' subroutine for feature to be overridable. Duh I had forgotten aout that. But I ran the test and didn't see that error ... maybe I'm reading the log incorrectly. > ...And that subroutine would be responsible for returning '' (empty > string) when feature is overridable.  See other feature_* subroutines. I've tried an implementation. Hopefully it's correct 8-/ >> I had considered going this way, but it made the code somewhat more >> complex so I went for the simpler solution. I'll look into putting it >> in separate cells further on. > > Well, by "left for later" here I thought about later as in after this > patch series about gravatars get accepted :-) Me too 8-D -- Giuseppe "Oblomov" Bilotta