about summary refs log tree commit diff stats
path: root/cgit.h
diff options
context:
space:
mode:
authorLars Hjemli2010-03-22 00:09:43 +0100
committerLars Hjemli2010-03-22 00:09:43 +0100
commitba56a37e863d0f90e3e953047486905cfb959925 (patch)
tree965e2c917f472264de35125eec35c361984eba4f /cgit.h
parentui-tree: add link to plain view for blobs in tree listing (diff)
downloadcgit-ba56a37e863d0f90e3e953047486905cfb959925.tar.gz
cgit-ba56a37e863d0f90e3e953047486905cfb959925.zip
Add support for environment variable expansion
This patch teaches cgit to expand environment variables in certain
cgitrc option values (cache_root, scan-path, include) plus when
finding the location of cgitrc itself.

One use case for this feature is virtual hosting - e.g. by setting
$CGIT_CONFIG='/etc/cgitrc/$HTTP_HOST' in httpd.conf, all virtual
hosts automatically gets their own cgitrc.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'cgit.h')
-rw-r--r--cgit.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/cgit.h b/cgit.h index cd4af72..568e0c0 100644 --- a/cgit.h +++ b/cgit.h
@@ -296,4 +296,6 @@ extern int cgit_close_filter(struct cgit_filter *filter);
296 296
297extern int readfile(const char *path, char **buf, size_t *size); 297extern int readfile(const char *path, char **buf, size_t *size);
298 298
299extern char *expand_macros(const char *txt);
300
299#endif /* CGIT_H */ 301#endif /* CGIT_H */