diff options
context:
space:
mode:
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Add `max-patch-count` to bound the patch view
Diffstat (limited to 'source/cgit.c')
-rw-r--r--source/cgit.c3
1 file changed, 3 insertions, 0 deletions
diff --git a/source/cgit.c b/source/cgit.c
index f83d15d..5af2232 100644
--- a/source/cgit.c
+++ b/source/cgit.c
@@ -269,6 +269,8 @@ static void config_cb(const char *name, const char *value)
ctx.cfg.max_repo_count = INT_MAX;
} else if (!strcmp(name, "max-commit-count"))
ctx.cfg.max_commit_count = atoi(value);
+ else if (!strcmp(name, "max-patch-count"))
+ ctx.cfg.max_patch_count = atoi(value);
else if (!strcmp(name, "project-list"))
ctx.cfg.project_list = strdup_first_line(expand_macros(value));
else if (!strcmp(name, "scan-path"))
@@ -422,6 +424,7 @@ static void prepare_context(void)
ctx.cfg.enable_git_config = 0;
ctx.cfg.max_repo_count = 50;
ctx.cfg.max_commit_count = 50;
+ ctx.cfg.max_patch_count = 50;
ctx.cfg.max_diff_files = 200; /* larger commits render stat only */
ctx.cfg.max_diff_lines = 1000; /* larger file diffs link out */
ctx.cfg.max_msg_len = 80;