diff options
author | Ondrej Jirman <ondrej.jirman@zonio.net> | 2007-05-26 03:33:41 +0200 |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2007-05-31 10:25:48 +0200 |
commit | 51a960a3ca6b0cade97db287a342996c3e1de48d (patch) | |
tree | d3360cd301c9e13d7aa9492e6628bf8d71736608 /ui-summary.c | |
parent | 6130231ed5e7475836a44d79d5f09e300e71a407 (diff) |
Implemented configurable HEAD shortlog on summary page.
This mirrors similiar functionality in gitweb. After clicking on
project on projectlist you will immediatelly see quick summary
of last N commits on HEAD.
[lh: changed from HEAD to cgit_query_head]
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'ui-summary.c')
-rw-r--r-- | ui-summary.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ui-summary.c b/ui-summary.c index 15e8aec..4bda4c2 100644 --- a/ui-summary.c +++ b/ui-summary.c @@ -19,6 +19,9 @@ static int cgit_print_branch_cb(const char *refname, const unsigned char *sha1, strncpy(buf, refname, sizeof(buf)); commit = lookup_commit(sha1); + // object is not really parsed at this point, because of some fallout + // from previous calls to git functions in cgit_print_log() + commit->object.parsed = 0; if (commit && !parse_commit(commit)){ info = cgit_parse_commit(commit); html("<tr><td>"); @@ -203,8 +206,11 @@ void cgit_print_summary() if (cgit_repo->readme) html_include(cgit_repo->readme); html("</div>"); - + if (cgit_summary_log > 0) + cgit_print_log(cgit_query_head, 0, cgit_summary_log, NULL, NULL, 0); html("<table class='list nowrap'>"); + if (cgit_summary_log > 0) + html("<tr class='nohover'><td colspan='4'> </td></tr>"); cgit_print_branches(); html("<tr class='nohover'><td colspan='4'> </td></tr>"); cgit_print_tags(); |