summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show 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;