Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.zx2c4.com/cgit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Hjemli <hjemli@gmail.com>2007-07-23 01:57:48 +0400
committerLars Hjemli <hjemli@gmail.com>2007-07-23 01:57:56 +0400
commit1d4aaff696ee1b9085dda0f0f3d84d9d20d96db0 (patch)
tree6674c5168d967c3efdbf8f445e7e975d54e43629 /ui-commit.c
parent4e9107abfe8d3edff17826875b417bcf40dc7390 (diff)
parentd6b01dac856efda565d4085e77826fd9ac83348a (diff)
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>
Diffstat (limited to 'ui-commit.c')
-rw-r--r--ui-commit.c9
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
@@ -139,7 +139,6 @@ void cgit_print_commit(char *hex)
struct commitinfo *info;
struct commit_list *p;
unsigned char sha1[20];
- char *filename;
char *tmp;
int i;
@@ -196,11 +195,9 @@ void cgit_print_commit(char *hex)
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&amp;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'>");