diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2012-10-09 19:56:14 (JST) |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2012-10-17 23:30:09 (JST) |
commit | 521e10c884055c800078e6dada97ccf6c5193aad (patch) | |
tree | f4a8398b2d64b171de909d57893441830a280712 /cgit.h | |
parent | c366bd6fa88fb7dbe1e42c84d56e2bda0b1682c5 (diff) | |
download | cgit-521e10c884055c800078e6dada97ccf6c5193aad.zip cgit-521e10c884055c800078e6dada97ccf6c5193aad.tar.gz |
scan-tree: Unify gitweb.* and cgit.* settings into one config option.
After some back and forth with Jamie and René, it looks like the git
config semantics are going to be like this:
- gitweb.category maps to the cgit repo config key "section"
- gitweb.description maps to the cgit repo config key "desc"
- gitweb.owner maps to the cgit repo config key "owner"
- cgit.* maps to all cgit repo config keys
This option can be enabled with "enable-git-config=1", and replaces
all previous "enable-gitweb-*" config keys.
The order of operations is as follows:
- git config settings are applied in the order that they exist in
the git config file
- if the owner is not set from git config, get the owner using the
usual getpwuid call
- if the description is not set from git config, look inside the
static $path/description file
- if section-from-path=1, override whatever previous settings were
inside of git config using the section-from-path logic
- parse $path/cgitrc for local repo.* settings, that override all
previous settings
Diffstat (limited to 'cgit.h')
-rw-r--r-- | cgit.h | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -200,9 +200,6 @@ struct cgit_config { | |||
200 | int case_sensitive_sort; | 200 | int case_sensitive_sort; |
201 | int embedded; | 201 | int embedded; |
202 | int enable_filter_overrides; | 202 | int enable_filter_overrides; |
203 | int enable_gitweb_owner; | ||
204 | int enable_gitweb_desc; | ||
205 | int enable_gitweb_section; | ||
206 | int enable_http_clone; | 203 | int enable_http_clone; |
207 | int enable_index_links; | 204 | int enable_index_links; |
208 | int enable_commit_graph; | 205 | int enable_commit_graph; |
@@ -211,6 +208,7 @@ struct cgit_config { | |||
211 | int enable_remote_branches; | 208 | int enable_remote_branches; |
212 | int enable_subject_links; | 209 | int enable_subject_links; |
213 | int enable_tree_linenumbers; | 210 | int enable_tree_linenumbers; |
211 | int enable_git_config; | ||
214 | int local_time; | 212 | int local_time; |
215 | int max_atom_items; | 213 | int max_atom_items; |
216 | int max_repo_count; | 214 | int max_repo_count; |
@@ -285,6 +283,7 @@ extern struct cgit_repolist cgit_repolist; | |||
285 | extern struct cgit_context ctx; | 283 | extern struct cgit_context ctx; |
286 | extern const struct cgit_snapshot_format cgit_snapshot_formats[]; | 284 | extern const struct cgit_snapshot_format cgit_snapshot_formats[]; |
287 | 285 | ||
286 | extern char *cgit_default_repo_desc; | ||
288 | extern struct cgit_repo *cgit_add_repo(const char *url); | 287 | extern struct cgit_repo *cgit_add_repo(const char *url); |
289 | extern struct cgit_repo *cgit_get_repoinfo(const char *url); | 288 | extern struct cgit_repo *cgit_get_repoinfo(const char *url); |
290 | extern void cgit_repo_config_cb(const char *name, const char *value); | 289 | extern void cgit_repo_config_cb(const char *name, const char *value); |