From: Jakub Narebski <jnareb@gmail.com>
To: Charles Bailey <charles@hashpling.org>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] gitweb: add a setting to control the tabstop width
Date: Mon, 3 Mar 2008 23:33:28 +0100 [thread overview]
Message-ID: <200803032333.29426.jnareb@gmail.com> (raw)
In-Reply-To: <20080303221159.GA6875@hashpling.org>
Charles Bailey <charles@hashpling.org> writes:
> Not everyone uses the same tab width. gitweb learns a new setting to
> control the tabstop width. The configuration can be set globally and
> on a per project basis. The default is 8, preserving existing
> behaviour. The configuration variable name is borrowed from the vim
> setting with the same behaviour.
Good idea. Very nice change.
> Signed-off-by: Charles Bailey <charles@hashpling.org>
> ---
>
> 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...
> This change should have a minimal impact on performance but it would
> appreciate some more eyes and ideally some performance testing on
> heavier systems than my own.
...but it would be better if you have checked at least on your system
if it does affect performance or not.
[...]
+our $tabstop_width;
I think I would write "our $tabstop_width = 8;" here.
--
Jakub Narebski
Poland
ShadeHawk on #git
next prev parent reply other threads:[~2008-03-03 22:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-03 22:11 [PATCH] gitweb: add a setting to control the tabstop width Charles Bailey
2008-03-03 22:33 ` Jakub Narebski [this message]
2008-03-03 22:52 ` Charles Bailey
2008-03-04 0:08 ` Jakub Narebski
2008-03-03 22:52 ` Jakub Narebski
2008-03-03 23:13 ` Junio C Hamano
2008-03-04 3:35 ` Martin Langhoff
2008-03-04 8:19 ` Jakub Narebski
2008-03-04 8:41 ` Charles Bailey
2008-03-04 8:36 ` Charles Bailey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200803032333.29426.jnareb@gmail.com \
--to=jnareb@gmail.com \
--cc=charles@hashpling.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).