diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Stat oversized diffs instead of inlining them
Diffstat (limited to 'source/cgit.c')
| -rw-r--r-- | source/cgit.c | 6 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 6 insertions, 0 deletions
diff --git a/source/cgit.c b/source/cgit.c index 5fcd17f..d0d454d 100644 --- a/source/cgit.c +++ b/source/cgit.c @@ -257,6 +257,10 @@ static void config_cb(const char *name, const char *value) ctx.cfg.max_repodesc_len = atoi(value); else if (!strcmp(name, "max-blob-size")) ctx.cfg.max_blob_size = atoi(value); + else if (!strcmp(name, "max-diff-files")) + ctx.cfg.max_diff_files = atoi(value); + else if (!strcmp(name, "max-diff-lines")) + ctx.cfg.max_diff_lines = atoi(value); else if (!strcmp(name, "max-ref-count")) ctx.cfg.max_ref_count = atoi(value); else if (!strcmp(name, "max-repo-count")) { @@ -418,6 +422,8 @@ 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_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; ctx.cfg.max_ref_count = 200; /* refs beyond this paginate */ ctx.cfg.max_repodesc_len = 80; |
