From: Lars Hjemli Date: Sat, 19 Jun 2010 09:42:12 +0000 (+0200) Subject: Merge branch 'ag/atom-fixes' X-Git-Url: https://gitweb.ps.run/ps-cgit/commitdiff_plain/c2766deb67acb1eae2b36dc0f5811a9cabb6db20?hp=-c Merge branch 'ag/atom-fixes' --- c2766deb67acb1eae2b36dc0f5811a9cabb6db20 diff --combined cgit.c index 6ccf4aa,bf64c9e..38bc136 --- a/cgit.c +++ b/cgit.c @@@ -62,8 -62,6 +62,8 @@@ void repo_config(struct cgit_repo *repo repo->enable_log_linecount = ctx.cfg.enable_log_linecount * atoi(value); else if (!strcmp(name, "enable-remote-branches")) repo->enable_remote_branches = atoi(value); + else if (!strcmp(name, "enable-subject-links")) + repo->enable_subject_links = atoi(value); else if (!strcmp(name, "max-stats")) repo->max_stats = cgit_find_stats_period(value, NULL); else if (!strcmp(name, "module-link")) @@@ -143,8 -141,6 +143,8 @@@ void config_cb(const char *name, const ctx.cfg.enable_log_linecount = atoi(value); else if (!strcmp(name, "enable-remote-branches")) ctx.cfg.enable_remote_branches = atoi(value); + else if (!strcmp(name, "enable-subject-links")) + ctx.cfg.enable_subject_links = atoi(value); else if (!strcmp(name, "enable-tree-linenumbers")) ctx.cfg.enable_tree_linenumbers = atoi(value); else if (!strcmp(name, "max-stats")) @@@ -169,6 -165,8 +169,8 @@@ ctx.cfg.commit_filter = new_filter(value, 0); else if (!strcmp(name, "embedded")) ctx.cfg.embedded = atoi(value); + else if (!strcmp(name, "max-atom-items")) + ctx.cfg.max_atom_items = atoi(value); else if (!strcmp(name, "max-message-length")) ctx.cfg.max_msg_len = atoi(value); else if (!strcmp(name, "max-repodesc-length")) @@@ -254,6 -252,8 +256,8 @@@ static void querystring_cb(const char * ctx.qry.period = xstrdup(value); } else if (!strcmp(name, "ss")) { ctx.qry.ssdiff = atoi(value); + } else if (!strcmp(name, "all")) { + ctx.qry.show_all = atoi(value); } } @@@ -296,6 -296,7 +300,7 @@@ static void prepare_context(struct cgit ctx->cfg.summary_branches = 10; ctx->cfg.summary_log = 10; ctx->cfg.summary_tags = 10; + ctx->cfg.max_atom_items = 10; ctx->cfg.ssdiff = 0; ctx->env.cgit_config = xstrdupn(getenv("CGIT_CONFIG")); ctx->env.http_host = xstrdupn(getenv("HTTP_HOST")); diff --combined cgit.h index 9b1e3f8,7fafb58..8884f9e --- a/cgit.h +++ b/cgit.h @@@ -73,7 -73,6 +73,7 @@@ struct cgit_repo int enable_log_filecount; int enable_log_linecount; int enable_remote_branches; + int enable_subject_links; int max_stats; time_t mtime; struct cgit_filter *about_filter; @@@ -146,6 -145,7 +146,7 @@@ struct cgit_query char *sort; int showmsg; int ssdiff; + int show_all; }; struct cgit_config { @@@ -182,9 -182,9 +183,10 @@@ int enable_log_filecount; int enable_log_linecount; int enable_remote_branches; + int enable_subject_links; int enable_tree_linenumbers; int local_time; + int max_atom_items; int max_repo_count; int max_commit_count; int max_lock_attempts; diff --combined cgitrc.5.txt index fcd4308,6cdfd03..5c24381 --- a/cgitrc.5.txt +++ b/cgitrc.5.txt @@@ -115,12 -115,6 +115,12 @@@ enable-remote-branches: in the summary and refs views. Default value: "0". See also: "repo.enable-remote-branches". +enable-subject-links:: + Flag which, when set to "1", will make cgit use the subject of the + parent commit as link text when generating links to parent commits + in commit view. Default value: "0". See also: + "repo.enable-subject-links". + enable-tree-linenumbers:: Flag which, when set to "1", will make cgit generate linenumber links for plaintext blobs printed in the tree view. Default value: "1". @@@ -172,6 -166,10 +172,10 @@@ logo-link: calculated url of the repository index page will be used. Default value: none. + max-atom-items:: + Specifies the number of items to display in atom feeds view. Default + value: "10". + max-commit-count:: Specifies the number of entries to list per page in "log" view. Default value: "50". @@@ -327,10 -325,6 +331,10 @@@ repo.enable-remote-branches: Flag which, when set to "1", will make cgit display remote branches in the summary and refs views. Default value: . +repo.enable-subject-links:: + A flag which can be used to override the global setting + `enable-subject-links'. Default value: none. + repo.max-stats:: Override the default maximum statistics period. Valid values are equal to the values specified for the global "max-stats" setting. Default