From 521e10c884055c800078e6dada97ccf6c5193aad Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 9 Oct 2012 06:56:14 -0400 Subject: scan-tree: Unify gitweb.* and cgit.* settings into one config option. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- cgit.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'cgit.h') diff --git a/cgit.h b/cgit.h index 8846e88..2742058 100644 --- a/cgit.h +++ b/cgit.h @@ -200,9 +200,6 @@ struct cgit_config { int case_sensitive_sort; int embedded; int enable_filter_overrides; - int enable_gitweb_owner; - int enable_gitweb_desc; - int enable_gitweb_section; int enable_http_clone; int enable_index_links; int enable_commit_graph; @@ -211,6 +208,7 @@ struct cgit_config { int enable_remote_branches; int enable_subject_links; int enable_tree_linenumbers; + int enable_git_config; int local_time; int max_atom_items; int max_repo_count; @@ -285,6 +283,7 @@ extern struct cgit_repolist cgit_repolist; extern struct cgit_context ctx; extern const struct cgit_snapshot_format cgit_snapshot_formats[]; +extern char *cgit_default_repo_desc; extern struct cgit_repo *cgit_add_repo(const char *url); extern struct cgit_repo *cgit_get_repoinfo(const char *url); extern void cgit_repo_config_cb(const char *name, const char *value); -- cgit v1.2.1