about summary refs log tree commit diff
path: root/cgit.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--cgit.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/cgit.c b/cgit.c
index 35f0da1..a97ed69 100644
--- a/cgit.c
+++ b/cgit.c
@@ -84,7 +84,12 @@ void repo_config(struct cgit_repo *repo, const char *name, const char *value)
 		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"))
+	else if (!strcmp(name, "commit-sort")) {
+		if (!strcmp(value, "date"))
+			repo->commit_sort = 1;
+		if (!strcmp(value, "topo"))
+			repo->commit_sort = 2;
+	} else if (!strcmp(name, "max-stats"))
 		repo->max_stats = cgit_find_stats_period(value, NULL);
 	else if (!strcmp(name, "module-link"))
 		repo->module_link= xstrdup(value);
@@ -261,7 +266,12 @@ void config_cb(const char *name, const char *value)
 		ctx.cfg.clone_url = xstrdup(value);
 	else if (!strcmp(name, "local-time"))
 		ctx.cfg.local_time = atoi(value);
-	else if (!prefixcmp(name, "mimetype."))
+	else if (!strcmp(name, "commit-sort")) {
+		if (!strcmp(value, "date"))
+			ctx.cfg.commit_sort = 1;
+		if (!strcmp(value, "topo"))
+			ctx.cfg.commit_sort = 2;
+	} else if (!prefixcmp(name, "mimetype."))
 		add_mimetype(name + 9, value);
 	else if (!strcmp(name, "include"))
 		parse_configfile(expand_macros(value), config_cb);
href='/src/commit/.vimrc?id=3efda1b35c9c0d1d3a7727c3d6a2c63dd0acc02c&follow=1'>Switch to base16-default colorschemeJune McEnroe 2013-03-26Replace nerdcommenter with vim-commentaryJune McEnroe 2013-03-24Add paredit.vimJune McEnroe 2013-03-14Update base16-vimJune McEnroe 2013-03-12Hide mode from below statuslineJune McEnroe 2013-03-12Switch to powerlineJune McEnroe 2013-03-12Remove vim-powerlineJune McEnroe 2013-02-03Update base16 and refheapJune McEnroe 2013-02-03Ignore plugin/private.vimJune McEnroe 2012-09-29Disable GUI dialogsJune McEnroe