readme & about-filter improvements: auto selection

John Keeping john at keeping.me.uk
Sun May 26 12:09:09 CEST 2013


On Sat, May 25, 2013 at 05:21:05PM +0200, Jason A. Donenfeld wrote:
>   * On readme=, multiple items may be specified, separated by a space,
> and if multiple items exist, cgit will display the first one that it's
> able to find.

Why not make this a multi-valued key instead?  That way we don't have to
worry about escaping for people who have whitespace in file names.

> Combined, they allow for the following setup. In cgitrc, I have these specified:
> 
>     about-filter=/var/www/uwsgi/cgit/filters/about-selector.sh
>     readme=:README.md :readme.md :README.mkd :readme.mkd :README.rst
> :readme.rst :README.txt :readme.txt :README :readme :INSTALL.txt
> :install.txt :INSTALL :install

Then this becomes:

    about-filter=/var/www/uwsgi/cgit/filters/about-selector.sh
    readme=:README.md
    readme=:readme.md
    readme=:README.mkd
    ...

Which is also a lot more readable when there is a long lost of file
names.


More information about the CGit mailing list