neocgit

a more 'modern' version of cgit
Log | Files | Refs | Submodules | README | LICENSE | git clone https://git.ne02ptzero.me/git/neocgit

commit 51f6547879e2516b9850b0b3c51df044c16a8a52
parent 16a3d2779ccd56bf7954d98da547247d8796544b
Author: Michael Krelin <hacker@klever.net>
Date:   Mon,  2 Jul 2007 02:29:12 +0200

make config adjustable via env variable CGIT_CONFIG

Signed-off-by: Michael Krelin <hacker@klever.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>

Diffstat:
Mcgit.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/cgit.c b/cgit.c @@ -222,6 +222,7 @@ static void cgit_parse_args(int argc, const char **argv) int main(int argc, const char **argv) { struct cacheitem item; + const char *cgit_config_env = getenv("CGIT_CONFIG"); htmlfd = STDOUT_FILENO; item.st.st_mtime = time(NULL); @@ -229,7 +230,8 @@ int main(int argc, const char **argv) cgit_repolist.count = 0; cgit_repolist.repos = NULL; - cgit_read_config(CGIT_CONFIG, cgit_global_config_cb); + cgit_read_config(cgit_config_env ? cgit_config_env : CGIT_CONFIG, + cgit_global_config_cb); cgit_repo = NULL; if (getenv("SCRIPT_NAME")) cgit_script_name = xstrdup(getenv("SCRIPT_NAME"));