Re: gitweb tab width - Mailing list pgsql-www

From Magnus Hagander
Subject Re: gitweb tab width
Date
Msg-id AANLkTindvNndbhZFfuRyqEuJ3JVH3MeGrEQdQW884jPv@mail.gmail.com
Whole thread Raw
In response to gitweb tab width  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Responses Re: gitweb tab width
List pgsql-www
On Thu, Sep 23, 2010 at 19:11, Kevin Grittner
<Kevin.Grittner@wicourts.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/


pgsql-www by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Time to remove betas and RCs from FTP archive?
Next
From: "Marc G. Fournier"
Date:
Subject: Re: Time to remove betas and RCs from FTP archive?