summaryrefslogtreecommitdiffabout
path: root/cgit.c
Side-by-side diff
Diffstat (limited to 'cgit.c') (more/less context) (show whitespace changes)
-rw-r--r--cgit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cgit.c b/cgit.c
index 28bab8d..aee7ba3 100644
--- a/cgit.c
+++ b/cgit.c
@@ -78,66 +78,66 @@ static void cgit_print_repo_page(struct cacheitem *item)
title = fmt("%s - %s", cgit_repo->name, cgit_repo->desc);
show_search = 0;
setenv("GIT_DIR", cgit_repo->path, 1);
if (cgit_query_page) {
if (cgit_repo->snapshots && !strcmp(cgit_query_page, "snapshot")) {
cgit_print_snapshot(item, cgit_query_sha1, "zip",
cgit_repo->url, cgit_query_name);
return;
}
if (!strcmp(cgit_query_page, "blob")) {
cgit_print_blob(item, cgit_query_sha1, cgit_query_path);
return;
}
}
if (cgit_query_page && !strcmp(cgit_query_page, "log"))
show_search = 1;
cgit_print_docstart(title, item);
if (!cgit_query_page) {
cgit_print_pageheader("summary", show_search);
cgit_print_summary();
cgit_print_docend();
return;
}
cgit_print_pageheader(cgit_query_page, show_search);
if (!strcmp(cgit_query_page, "log")) {
- cgit_print_log(cgit_query_head, cgit_query_ofs, 100,
- cgit_query_search);
+ cgit_print_log(cgit_query_head, cgit_query_ofs,
+ cgit_max_commit_count, cgit_query_search);
} else if (!strcmp(cgit_query_page, "tree")) {
cgit_print_tree(cgit_query_sha1, cgit_query_path);
} else if (!strcmp(cgit_query_page, "commit")) {
cgit_print_commit(cgit_query_sha1);
} else if (!strcmp(cgit_query_page, "view")) {
cgit_print_view(cgit_query_sha1, cgit_query_path);
} else if (!strcmp(cgit_query_page, "diff")) {
cgit_print_diff(cgit_query_sha1, cgit_query_sha2);
} else {
cgit_print_error("Invalid request");
}
cgit_print_docend();
}
static void cgit_fill_cache(struct cacheitem *item, int use_cache)
{
static char buf[PATH_MAX];
int stdout2;
getcwd(buf, sizeof(buf));
item->st.st_mtime = time(NULL);
if (use_cache) {
stdout2 = chk_positive(dup(STDOUT_FILENO),
"Preserving STDOUT");
chk_zero(close(STDOUT_FILENO), "Closing STDOUT");
chk_positive(dup2(item->fd, STDOUT_FILENO), "Dup2(cachefile)");
}
if (cgit_query_repo)
cgit_print_repo_page(item);
else