author | Lars Hjemli <hjemli@gmail.com> | 2007-07-22 21:57:48 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2007-07-22 21:57:56 (UTC) |
commit | 1d4aaff696ee1b9085dda0f0f3d84d9d20d96db0 (patch) (side-by-side diff) | |
tree | 6674c5168d967c3efdbf8f445e7e975d54e43629 /ui-commit.c | |
parent | 4e9107abfe8d3edff17826875b417bcf40dc7390 (diff) | |
parent | d6b01dac856efda565d4085e77826fd9ac83348a (diff) | |
download | cgit-1d4aaff696ee1b9085dda0f0f3d84d9d20d96db0.zip cgit-1d4aaff696ee1b9085dda0f0f3d84d9d20d96db0.tar.gz cgit-1d4aaff696ee1b9085dda0f0f3d84d9d20d96db0.tar.bz2 |
Merge branch 'master' of git://git.klever.net/patchwork/cgit
* 'master' of git://git.klever.net/patchwork/cgit:
link raw blob from tree file view
fix: changed view link to blob in summary.
allow selective enabling of snapshots
shorten snapshot names to repo basename
introduce cgit_repobasename
added snapshot filename to the link
add plain uncompressed tar snapshort format
introduced .tar.bz2 snapshots
compress .tar.gz using gzip as a filter
added a chk_non_negative check
css: adjust vertical-align of commit info th cells
add support for snapshot tarballs
Conflicts:
ui-summary.c
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | ui-commit.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/ui-commit.c b/ui-commit.c index 2679b59..50e9e11 100644 --- a/ui-commit.c +++ b/ui-commit.c @@ -130,25 +130,24 @@ void inspect_filepair(struct diff_filepair *pair) max_changes = lines_added + lines_removed; total_adds += lines_added; total_rems += lines_removed; } void cgit_print_commit(char *hex) { struct commit *commit, *parent; struct commitinfo *info; struct commit_list *p; unsigned char sha1[20]; - char *filename; char *tmp; int i; if (!hex) hex = cgit_query_head; curr_rev = hex; if (get_sha1(hex, sha1)) { cgit_print_error(fmt("Bad object id: %s", hex)); return; } commit = lookup_commit_reference(sha1); @@ -187,29 +186,27 @@ void cgit_print_commit(char *hex) continue; } html("<tr><th>parent</th>" "<td colspan='2' class='sha1'>"); cgit_commit_link(sha1_to_hex(p->item->object.sha1), NULL, NULL, cgit_query_head, sha1_to_hex(p->item->object.sha1)); html(" ("); cgit_diff_link("diff", NULL, NULL, cgit_query_head, hex, sha1_to_hex(p->item->object.sha1), NULL); html(")</td></tr>"); } if (cgit_repo->snapshots) { - htmlf("<tr><th>download</th><td colspan='2' class='sha1'><a href='"); - filename = fmt("%s-%s.zip", cgit_query_repo, hex); - html_attr(cgit_pageurl(cgit_query_repo, "snapshot", - fmt("id=%s&name=%s", hex, filename))); - htmlf("'>%s</a></td></tr>", filename); + html("<tr><th>download</th><td colspan='2' class='sha1'>"); + cgit_print_snapshot_links(cgit_query_repo,hex,cgit_repo->snapshots); + html("</td></tr>"); } html("</table>\n"); html("<div class='commit-subject'>"); html_txt(info->subject); html("</div>"); html("<div class='commit-msg'>"); html_txt(info->msg); html("</div>"); if (!(commit->parents && commit->parents->next && commit->parents->next->next)) { html("<div class='diffstat-header'>Diffstat</div>"); html("<table class='diffstat'>"); max_changes = 0; |