From f97c707a3b975d32910331f72783ec3044e3c0ee Mon Sep 17 00:00:00 2001
From: Michael Krelin
Date: Wed, 18 Jul 2007 14:40:03 +0200
Subject: add support for snapshot tarballs - reworked cgit_print_snapshot to
use a list of supported archivers and pick one for the suffix supplied -
moved printing of snaphot links into ui-snapshot and make it iterate through
the said list
---
ui-commit.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
(limited to 'ui-commit.c')
diff --git a/ui-commit.c b/ui-commit.c
index 2679b59..bf5e6dc 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(")");
}
if (cgit_repo->snapshots) {
- htmlf("
download | %s |
", filename);
+ html("download | ");
+ cgit_print_snapshot_links(cgit_query_repo,hex);
+ html(" |
");
}
html("\n");
html("");
--
cgit v1.2.3-2-gb3c3
From dc3c9b5bc48779f37f2fbcbadce8865eaf4a360e Mon Sep 17 00:00:00 2001
From: Michael Krelin
Date: Sat, 21 Jul 2007 18:00:53 +0200
Subject: allow selective enabling of snapshots
snapshot configuration parameter now can be a
space/slash/comma/colon/semicolon/pipe-separated list of snaphot suffixes as
listed in ui-snapshot.c
Signed-off-by: Michael Krelin
---
ui-commit.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'ui-commit.c')
diff --git a/ui-commit.c b/ui-commit.c
index bf5e6dc..50e9e11 100644
--- a/ui-commit.c
+++ b/ui-commit.c
@@ -196,7 +196,7 @@ void cgit_print_commit(char *hex)
}
if (cgit_repo->snapshots) {
html("download | ");
- cgit_print_snapshot_links(cgit_query_repo,hex);
+ cgit_print_snapshot_links(cgit_query_repo,hex,cgit_repo->snapshots);
html(" |
");
}
html("\n");
--
cgit v1.2.3-2-gb3c3