From ab2ab95f09994560f62fd631f07d3b6e3577aa6e Mon Sep 17 00:00:00 2001 From: Lars Hjemli Date: Thu, 8 Feb 2007 13:53:13 +0100 Subject: Add support for snapshots Make a link from the commit viewer to a snapshot of the corresponding tree. Currently only zip-format is supported. Signed-off-by: Lars Hjemli --- ui-commit.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ui-commit.c') diff --git a/ui-commit.c b/ui-commit.c index 73fa104..de3f2cf 100644 --- a/ui-commit.c +++ b/ui-commit.c @@ -128,6 +128,7 @@ void cgit_print_commit(const char *hex) struct commit_list *p; unsigned char sha1[20]; char *query; + char *filename; if (get_sha1(hex, sha1)) { cgit_print_error(fmt("Bad object id: %s", hex)); @@ -168,6 +169,12 @@ void cgit_print_commit(const char *hex) htmlf("'>%s\n", sha1_to_hex(p->item->object.sha1)); } + htmlf("download%s", filename); + html("\n"); html("
"); html_txt(info->subject); -- cgit v1.2.3-59-g8ed1b