Re: gitweb tab width

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: pgsql-www(at)postgresql(dot)org
Subject: Re: gitweb tab width
Date: 2010-09-23 17:31:55
Message-ID: AANLkTindvNndbhZFfuRyqEuJ3JVH3MeGrEQdQW884jPv@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-www

On Thu, Sep 23, 2010 at 19:11, Kevin Grittner
<Kevin(dot)Grittner(at)wicourts(dot)gov> wrote:
> Is there some way to convince gitweb that a tab goes to the next
> four character boundary rather than eight?  (This seems to affect
> raw, blob, and diff displays.)

At a first look, it seems not easily. It has:
sub untabify {
my $line = shift;

while ((my $pos = index($line, "\t")) != -1) {
if (my $count = (8 - ($pos % 8))) {
my $spaces = ' ' x $count;
$line =~ s/\t/$spaces/;
}
}

return $line;
}

Which can do it, but if that's what's used, it'll have an effect on
all the other repositories on the server as well. You'd want it to be
configurable on a per-repository basis.

Now, gitweb is also "just a perlscript", so it can probably be adapted
to read that from the config file :-)

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

In response to

Responses

Browse pgsql-www by date

  From Date Subject
Next Message Marc G. Fournier 2010-09-23 19:09:41 Re: Time to remove betas and RCs from FTP archive?
Previous Message Josh Berkus 2010-09-23 17:24:58 Re: Time to remove betas and RCs from FTP archive?