aboutsummaryrefslogtreecommitdiffstats
path: root/ui-shared.c
diff options
context:
space:
mode:
authorGravatar Lukas Fleischer <cgit@cryptocrack.de>2013-03-04 16:52:35 (JST)
committerGravatar Jason A. Donenfeld <Jason@zx2c4.com>2013-03-05 09:50:58 (JST)
commit1a5e8633ce3ec7f3a82bc0f4ca5ca810473714b9 (patch)
tree8cfeb931ccddd7574b96dc62ea9fc45b4d421a10 /ui-shared.c
parent71926bfb342b75a6721441b1fe9b9db8b50775d5 (diff)
downloadcgit-1a5e8633ce3ec7f3a82bc0f4ca5ca810473714b9.zip
cgit-1a5e8633ce3ec7f3a82bc0f4ca5ca810473714b9.tar.gz
ui-shared.c: Remove unused function print_archive_ref()
This is no longer used as of commit f135569b. Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de>
Diffstat (limited to 'ui-shared.c')
-rw-r--r--ui-shared.c39
1 files changed, 0 insertions, 39 deletions
diff --git a/ui-shared.c b/ui-shared.c
index 31224bc..77a302d 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -712,45 +712,6 @@ static int print_branch_option(const char *refname, const unsigned char *sha1,
712 return 0; 712 return 0;
713} 713}
714 714
715static int print_archive_ref(const char *refname, const unsigned char *sha1,
716 int flags, void *cb_data)
717{
718 struct tag *tag;
719 struct taginfo *info;
720 struct object *obj;
721 char buf[256], *url;
722 unsigned char fileid[20];
723 int *header = (int *)cb_data;
724
725 if (prefixcmp(refname, "refs/archives"))
726 return 0;
727 strncpy(buf, refname + 14, sizeof(buf));
728 obj = parse_object(sha1);
729 if (!obj)
730 return 1;
731 if (obj->type == OBJ_TAG) {
732 tag = lookup_tag(sha1);
733 if (!tag || parse_tag(tag) || !(info = cgit_parse_tag(tag)))
734 return 0;
735 hashcpy(fileid, tag->tagged->sha1);
736 } else if (obj->type != OBJ_BLOB) {
737 return 0;
738 } else {
739 hashcpy(fileid, sha1);
740 }
741 if (!*header) {
742 html("<h1>download</h1>\n");
743 *header = 1;
744 }
745 url = cgit_pageurl(ctx.qry.repo, "blob",
746 fmt("id=%s&amp;path=%s", sha1_to_hex(fileid),
747 buf));
748 html_link_open(url, NULL, "menu");
749 html_txt(strlpart(buf, 20));
750 html_link_close();
751 return 0;
752}
753
754void cgit_add_hidden_formfields(int incl_head, int incl_search, 715void cgit_add_hidden_formfields(int incl_head, int incl_search,
755 const char *page) 716 const char *page)
756{ 717{