gdamjan / cgit

GNU General Public License v2.0
0 stars 0 forks source link

support config files in .ini style format #1

Open gdamjan opened 6 years ago

gdamjan commented 6 years ago

cgit currently uses it's own style of config files. there's value of making it support the git (more or less .ini) format of config files. And since it already bundles/links git, the git config api can be used.

One immidiate use case is a single config file hosting of cgit with uwsgi + cgi. For example:

#! /bin/sh

exec /usr/bin/uwsgi --ini $0

[uwsgi]
master          = true
http-socket     = :8000
offload-threads = 5
async           = 1000
ugreen          = true
plugin          = 0:cgi
cgi             = /=/usr/lib/cgit/cgit.cgi
check-static    = /usr/share/webapps/cgit/
env = CGIT_GIT_CONFIG_FILE=%p

[cgit]
branch-sort=age
enable-commit-graph=1
enable-index-links=1
enable-git-config=1
scan-path=.
gdamjan commented 6 years ago

consider the section= concept in cgit config files, and maybe replace it with [cgit "section-name"] which should be supported by the git config api.