summaryrefslogtreecommitdiffabout
authorMichael Krelin <hacker@klever.net>2007-07-02 00:29:12 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2007-07-03 19:28:13 (UTC)
commit51f6547879e2516b9850b0b3c51df044c16a8a52 (patch) (side-by-side diff)
treef73a2db285a41c1c8d6ece33ec7519728a392d84
parent16a3d2779ccd56bf7954d98da547247d8796544b (diff)
downloadcgit-51f6547879e2516b9850b0b3c51df044c16a8a52.zip
cgit-51f6547879e2516b9850b0b3c51df044c16a8a52.tar.gz
cgit-51f6547879e2516b9850b0b3c51df044c16a8a52.tar.bz2
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 (more/less context) (ignore whitespace changes)
-rw-r--r--cgit.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/cgit.c b/cgit.c
index d9a03c2..1281bfa 100644
--- a/cgit.c
+++ b/cgit.c
@@ -224,2 +224,3 @@ int main(int argc, const char **argv)
struct cacheitem item;
+ const char *cgit_config_env = getenv("CGIT_CONFIG");
@@ -231,3 +232,4 @@ int main(int argc, const char **argv)
- 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;