about summary refs log tree commit diff
path: root/ui-commit.c
diff options
context:
space:
mode:
authorLars Hjemli <hjemli@gmail.com>2007-07-22 23:57:48 +0200
committerLars Hjemli <hjemli@gmail.com>2007-07-22 23:57:56 +0200
commit1d4aaff696ee1b9085dda0f0f3d84d9d20d96db0 (patch)
tree6674c5168d967c3efdbf8f445e7e975d54e43629 /ui-commit.c
parentAdd ui-tag.c (diff)
parentlink raw blob from tree file view (diff)
downloadcgit-pink-1d4aaff696ee1b9085dda0f0f3d84d9d20d96db0.tar.gz
cgit-pink-1d4aaff696ee1b9085dda0f0f3d84d9d20d96db0.zip
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 '')
-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'>");