Fwd: source-filter isn't getting applied

John Keeping john at keeping.me.uk
Wed Jul 30 09:57:30 CEST 2014

On Wed, Jul 30, 2014 at 12:17:26AM -0400, Nik Nyby wrote:
> Great, this helped me debug the error. I looked at the part of the strace
> where it was reading the /etc/cgitrc, and it looked like it was only
> reading the first setting, even though the following settings are getting
> applied. I'm not sure exactly why yet, but putting the source-filter
> setting at the top of the /etc/cgitrc fixes the problem, and my source
> files are now highlighted.

I suspect that was just strace truncating the data, but at least it
pointed to the answer!

Global settings get frozen for each repository when it is added, so you
should generally do all the configuration near the top of the file and
then add repositories (either explicity or with "scan-path=...") near
the bottom.

> Now I'm dealing with the same problem with the about-filter, because
> putting that setting at the top isn't giving me markdown highlighting.
> On Tue, Jul 29, 2014 at 3:37 AM, John Keeping <john at keeping.me.uk> wrote:
> > On Mon, Jul 28, 2014 at 11:59:10PM -0400, Nik Nyby wrote:
> > > The permissions on the script files are set to be executable by everyone:
> > > -rwxr-xr-x
> > >
> > > Thanks for the strace idea. I'm looking through the strace, but I haven't
> > > seen any helpful mention of the filter scripts yet. I've attached an
> > > abridged version of my strace with the middle of the file taken out. I
> > > don't know if this is helpful or not. I'll let you know if I solve the
> > > problem.
> >
> > If CGit was going to open a filter, it would do so after this line:
> >
> >         write(1, "<td class='lines'><pre><code>", 29) = 29
> >
> > So it looks like something in the configuration isn't being read
> > correctly, but I think you snipped the strace log before we could see
> > which config file it reads.

More information about the CGit mailing list