[PATCH] Support .git/category files

John Keeping john at keeping.me.uk
Thu Mar 5 19:01:39 CET 2015


On Thu, Mar 05, 2015 at 06:50:47PM +0100, Jan-Marek Glogowski wrote:
> Am 05.03.2015 um 18:38 schrieb John Keeping:
> > What's the advantage of this over using "enable-git-config=1" and
> > "cgit.section" (we even support "gitweb.section" as an alias)?
> 
> Well - I have 100+ repositories, which already have the "category" file.
> There is no "advantage" over any other method.
> 
> Am 05.03.2015 um 18:41 schrieb Lukas Fleischer:>
> > There already are at least two ways to achieve the same thing (using
> > the Git configuration variables gitweb.category or cgit.section and
> > repository-specific cgitrc files). Do we really need another
> > alternative? Is this just for GitWeb compatibility or does this have
> > any advantages over the existing options?
> 
> Yes - it's "just" GitWeb compatibility, like - I guess - the
> "description" file support just the few lines before my path.

The "description" file is a bit different though - it's in the default
repository template that ships with Git and is used by the sample hooks
that ship there.

I'm not sure "category" is similar enough, particularly when you can do:

	for repo in $repositories
	do
		git -C "$repo" config gitweb.category "$(cat "$repo"/category)" &&
		rm -f "$repo"/category
	done

and still have a configuration that works with both Gitweb and CGit.


More information about the CGit mailing list