Re: [PATCH] gitweb: add a setting to control the tabstop width

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Charles Bailey wrote:
> On Mon, Mar 03, 2008 at 11:33:28PM +0100, Jakub Narebski wrote:
>> Charles Bailey <charles@xxxxxxxxxxxxx> writes:
>>> 
>>> The untabify function seems the sensible place to make the change. As
>>> untabify is called once per line from various different locations it
>>> also makes sense to cache the result of the config lookup in a package
>>> variable, though this makes the change slightly less neat.
>> 
>> Since b201927 (gitweb: Read repo config using 'git config -z -l')
>> repository config is cached in %config hash (per repository), so
>> I don't think global / package variable $tabstop_width is really
>> needed...
> 
> Fair point, although we still save the cost of some 'is the config
> variable overrideable and if so is it overriden' logic.  Untabify is a
> once per line call which is more frequesnt than most gitweb config
> checking calls.

Good enough.

One think I'd worry about is interaction with mod_perl (or FastCGI),
namely if $tabstop_width wouldn't get stale information.  Perhaps
writing

  our $tabstop_width = undef;

as initializer would be enough.
-- 
Jakub Narebski
Poland
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux