{"schema":"libjg2-1",
"vpath":"/git/",
"avatar":"/git/avatar/",
"alang":"",
"gen_ut":1747279890,
"reponame":"cgit",
"desc":"CGI gitweb",
"owner": { "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },"url":"https://warmcat.com/repo/cgit",
"f":3,
"items": [
{"schema":"libjg2-1",
"cid":"77c5c37fdcde8cd111e871a32b58b26a",
"commit": {"type":"commit",
"time": 1193747914,
"time_ofs": 60,
"oid_tree": { "oid": "2e82baf582b7ba0b34f498e1e7494800070067f9", "alias": []},
"oid":{ "oid": "0c8e184e9cbf4d3a1e907de9125f6d8210c169d6", "alias": []},
"msg": "Change the cgit layout",
"sig_commit": { "git_time": { "time": 1193747914, "offset": 60 }, "name": "Lars Hjemli", "email": "hjemli@gmail.com", "md5": "3b0d25799af76340d36a521e61d1f464" },
"sig_author": { "git_time": { "time": 1193737658, "offset": 60 }, "name": "Lars Hjemli", "email": "hjemli@gmail.com", "md5": "3b0d25799af76340d36a521e61d1f464" }},
"body": "Change the cgit layout\n\nThis modifies and hopefully improves the layout of all cgit pages:\n\n * Remove the header from all pages and replace it with a sidebar;\n most pages have sufficient width but many needs more height.\n\n * Add a dropdown-box to switch between branches, using a one-liner\n javascript to reload the current page in context of the selected branch.\n\n * Include refs found below refs/archives in the sidebar, appearing as a\n set of menuitems below a 'download' heading.\n\n * Include the brand new cgit logo\n\nSigned-off-by: Lars Hjemli \u003chjemli@gmail.com\u003e\n"
,
"diff": "diff --git a/cgit.css b/cgit.css\nindex 5d47099..6cf4517 100644\n--- a/cgit.css\n+++ b/cgit.css\n@@ -1,15 +1,16 @@\n-body {\n-\tfont-family: arial, sans-serif;\n-\tfont-size: 11pt;\n-\tcolor: black;\n-\tbackground: white;\n-}\n-\n body, table {\n \tpadding: 0em;\n \tmargin: 0em;\n }\n \n+body {\n+\tfont-family: sans;\n+\tfont-size: 10pt;\n+\tcolor: #333;\n+\tbackground: white;\n+\tpadding-left: 4px;\n+}\n+\n table {\n border-collapse: collapse;\n }\n@@ -35,12 +36,13 @@ h4 {\n }\n \n a {\n-\tcolor: blue;\n+\tcolor: #600;\n \ttext-decoration: none;\n }\n \n a:hover {\n-\ttext-decoration: underline;\n+\tbackground-color: #ddd;\n+\ttext-decoration: none;\n }\n \n table.list {\n@@ -53,7 +55,7 @@ table.list tr {\n }\n \n table.list tr:hover {\n-\tbackground: #eee;\n+\tbackground: #f8f8f8;\n }\n \n table.list tr.nohover:hover {\n@@ -76,98 +78,78 @@ img {\n \tborder: none;\n }\n \n-table#layout {\n-\twidth: 100%;\n-\tborder-collapse: collapse;\n-\tmargin: 0px;\n-}\n-\n-td#header, td#logo {\n-\tcolor: #666;\n-\tbackground-color: #ddd;\n-\tborder-bottom: solid 1px #000;\n-}\n-\n-td#header {\n-\tfont-size: 150%;\n-\tfont-weight: bold;\n-\tpadding: 0.2em 0.5em;\n-\tvertical-align: text-bottom;\n-}\n-\n-td#header a {\n-\tcolor: #666;\n-}\n-\n-td#header a:hover {\n-\ttext-decoration: underline;\n+div#sidebar {\n+\tvertical-align: top;\n+\twidth: 162px;\n+\tpadding: 0px 0px 0px 0px;\n+\tmargin: 4px;\n+\tfloat: left;\n }\n \n-td#logo {\n-\ttext-align: right;\n-\tvertical-align: middle;\n-\tpadding-right: 0.5em;\n+div#logo {\n+\tmargin: 0px;\n+\tpadding: 4px 0px 4px 0px;\n+\ttext-align: center;\n+\tbackground-color: #ccc;\n+\tborder-top: solid 1px #eee;\n+\tborder-left: solid 1px #eee;\n+\tborder-right: solid 1px #aaa;\n+\tborder-bottom: solid 1px #aaa;\n }\n \n-td#crumb, td#search {\n-\tcolor: #ccc;\n-\tborder-top: solid 3px #555;\n-\tbackground-color: #666;\n-\tborder-bottom: solid 1px #333;\n-\tpadding: 2px 1em;\n+div#sidebar div.infobox {\n+\tmargin: 0px 0px 0pax 0px;\n+\tpadding: 0.5em;\n+\ttext-align: left;\n+\tbackground-color: #ccc;\n+\tborder-top: solid 1px #eee;\n+\tborder-left: solid 1px #eee;\n+\tborder-right: solid 1px #aaa;\n+\tborder-bottom: solid 1px #aaa;\n }\n \n-td#crumb {\n+div#sidebar div.infobox h1 {\n+\tfont-size: 11pt;\n \tfont-weight: bold;\n+\tmargin: 0px;\n }\n \n-td#crumb a {\n-\tcolor: #ccc;\n-\tbackground-color: #666;\n-\tpadding: 0em 0.5em 0em 0.5em;\n-}\n-\n-td#crumb a:hover {\n-\tcolor: #666;\n+div#sidebar div.infobox a.menu {\n+\tdisplay: block;\n \tbackground-color: #ccc;\n+\tpadding: 0.1em 0.5em;\n \ttext-decoration: none;\n }\n \n-td#search {\n-\ttext-align: right;\n-\tvertical-align: middle;\n-\tpadding-right: 0.5em;\n-}\n-\n-td#search form {\n-\tmargin: 0px;\n-\tpadding: 0px;\n+div#sidebar div.infobox a.menu:hover {\n+\tbackground-color: #bbb;\n+\ttext-decoration: none;\n }\n \n-td#search select {\n-\tfont-size: 9pt;\n+div#sidebar div.infobox select {\n+\twidth: 100%;\n+\tborder: solid 1px #aaa;\n+\tbackground-color: #bbb;\n+\tmargin: 2px 0px 0px 0px;\n \tpadding: 0px;\n-\tborder: solid 1px #333;\n-\tcolor: #333;\n-\tbackground-color: #fff;\n }\n \n-td#search input {\n-\tfont-size: 9pt;\n-\tpadding: 0px;\n+div#sidebar div.infobox input.txt {\n+\twidth: 100%;\n+\tborder: solid 1px #aaa;\n+\tbackground-color: #bbb;\n+\tmargin: 2px 0px 0px 0px;\n+\tpadding: 0;\n }\n \n-td#search input.txt {\n-\twidth: 8em;\n-\tborder: solid 1px #333;\n-\tcolor: #333;\n-\tbackground-color: #fff;\n+table#grid {\n+\tmargin: 0px;\n }\n \n-td#search input.btn {\n-\tborder: solid 1px #333;\n-\tcolor: #333;\n-\tbackground-color: #ccc;\n+td#content {\n+\tvertical-align: top;\n+\tpadding: 1em 2em 1em 1em;\n+\tborder: none;\n }\n \n div#summary {\n@@ -187,10 +169,6 @@ table#downloads th {\n \tbackground-color: #ccc;\n }\n \n-td#content {\n-\tpadding: 1em 0.5em;\n-}\n-\n div#blob {\n \tborder: solid 1px black;\n }\n@@ -284,7 +262,6 @@ div.diffstat-header {\n \n table.diffstat {\n \tborder-collapse: collapse;\n-\twidth: 100%;\n \tborder: solid 1px #aaa;\n \tbackground-color: #eee;\n }\n@@ -325,7 +302,7 @@ table.diffstat td.upd a {\n }\n \n table.diffstat td.graph {\n-\twidth: 75%;\n+\twidth: 500px;\n \tvertical-align: middle;\n }\n \ndiff --git a/cgit.h b/cgit.h\nindex b8af970..42036c3 100644\n--- a/cgit.h\n+++ b/cgit.h\n@@ -181,6 +181,8 @@ extern int chk_non_negative(int result, char *msg);\n \n extern int hextoint(char c);\n extern char *trim_end(const char *str, char c);\n+extern char *strlpart(char *txt, int maxlen);\n+extern char *strrpart(char *txt, int maxlen);\n \n extern void cgit_add_ref(struct reflist *list, struct refinfo *ref);\n extern int cgit_refs_cb(const char *refname, const unsigned char *sha1,\ndiff --git a/cgit.png b/cgit.png\nnew file mode 100644\nindex 0000000..ee48197\nBinary files /dev/null and b/cgit.png differ\ndiff --git a/cgitrc b/cgitrc\nindex 2b09e01..6363c9c 100644\n--- a/cgitrc\n+++ b/cgitrc\n@@ -85,8 +85,13 @@\n #root-title\u003dGit repository browser\n \n \n-## If specified, the file at this path will be included as HTML in the index\n-## of repositories\n+## If specified, the file at this path will be included as HTML in the\n+## sidebar on the repository index page\n+#index-info\u003d\n+\n+\n+## If specified, the file at this path will be included as HTML above\n+## the repository index\n #index-header\u003d\n \n \ndiff --git a/shared.c b/shared.c\nindex 50fe8e1..e06df91 100644\n--- a/shared.c\n+++ b/shared.c\n@@ -303,6 +303,37 @@ char *trim_end(const char *str, char c)\n \treturn s;\n }\n \n+char *strlpart(char *txt, int maxlen)\n+{\n+\tchar *result;\n+\n+\tif (!txt)\n+\t\treturn txt;\n+\n+\tif (strlen(txt) \u003c\u003d maxlen)\n+\t\treturn txt;\n+\tresult \u003d xmalloc(maxlen + 1);\n+\tmemcpy(result, txt, maxlen - 3);\n+\tresult[maxlen-1] \u003d result[maxlen-2] \u003d result[maxlen-3] \u003d '.';\n+\tresult[maxlen] \u003d '\u005c0';\n+\treturn result;\n+}\n+\n+char *strrpart(char *txt, int maxlen)\n+{\n+\tchar *result;\n+\n+\tif (!txt)\n+\t\treturn txt;\n+\n+\tif (strlen(txt) \u003c\u003d maxlen)\n+\t\treturn txt;\n+\tresult \u003d xmalloc(maxlen + 1);\n+\tmemcpy(result + 3, txt + strlen(txt) - maxlen + 4, maxlen - 3);\n+\tresult[0] \u003d result[1] \u003d result[2] \u003d '.';\n+\treturn result;\n+}\n+\n void cgit_add_ref(struct reflist *list, struct refinfo *ref)\n {\n \tsize_t size;\ndiff --git a/ui-shared.c b/ui-shared.c\nindex 1418010..1d66940 100644\n--- a/ui-shared.c\n+++ b/ui-shared.c\n@@ -362,77 +362,149 @@ void cgit_print_docstart(char *title, struct cacheitem *item)\n \n void cgit_print_docend()\n {\n-\thtml(\u0022\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e\u0022);\n-\thtml(\u0022\u003c/body\u003e\u005cn\u003c/html\u003e\u005cn\u0022);\n+\thtml(\u0022\u003c/td\u003e\u005cn\u003c/tr\u003e\u005cn\u003ctable\u003e\u005cn\u003c/body\u003e\u005cn\u003c/html\u003e\u005cn\u0022);\n+}\n+\n+int print_branch_option(const char *refname, const unsigned char *sha1,\n+\t\t\tint flags, void *cb_data)\n+{\n+\tchar *name \u003d (char *)refname;\n+\thtml_option(name, name, cgit_query_head);\n+\treturn 0;\n+}\n+\n+int print_archive_ref(const char *refname, const unsigned char *sha1,\n+\t\t int flags, void *cb_data)\n+{\n+\tstruct tag *tag;\n+\tstruct taginfo *info;\n+\tstruct object *obj;\n+\tchar buf[256], *url;\n+\tunsigned char fileid[20];\n+\tint *header \u003d (int *)cb_data;\n+\n+\tif (prefixcmp(refname, \u0022refs/archives\u0022))\n+\t\treturn 0;\n+\tstrncpy(buf, refname+14, sizeof(buf));\n+\tobj \u003d parse_object(sha1);\n+\tif (!obj)\n+\t\treturn 1;\n+\tif (obj-\u003etype \u003d\u003d OBJ_TAG) {\n+\t\ttag \u003d lookup_tag(sha1);\n+\t\tif (!tag || parse_tag(tag) || !(info \u003d cgit_parse_tag(tag)))\n+\t\t\treturn 0;\n+\t\thashcpy(fileid, tag-\u003etagged-\u003esha1);\n+\t} else if (obj-\u003etype !\u003d OBJ_BLOB) {\n+\t\treturn 0;\n+\t} else {\n+\t\thashcpy(fileid, sha1);\n+\t}\n+\tif (!*header) {\n+\t\thtml(\u0022\u003cp\u003e\u003ch1\u003edownload\u003c/h1\u003e\u0022);\n+\t\t*header \u003d 1;\n+\t}\n+\turl \u003d cgit_pageurl(cgit_query_repo, \u0022blob\u0022,\n+\t\t\t fmt(\u0022id\u003d%s\u0026amp;path\u003d%s\u0022, sha1_to_hex(fileid),\n+\t\t\t buf));\n+\thtml_link_open(url, NULL, \u0022menu\u0022);\n+\thtml_txt(strlpart(buf, 20));\n+\thtml_link_close();\n+\treturn 0;\n+}\n+\n+void add_hidden_formfields(int incl_head, int incl_search)\n+{\n+\tif (!cgit_virtual_root) {\n+\t\tif (cgit_query_repo)\n+\t\t\thtml_hidden(\u0022r\u0022, cgit_query_repo);\n+\t\tif (cgit_query_page)\n+\t\t\thtml_hidden(\u0022p\u0022, cgit_query_page);\n+\t}\n+\n+\tif (incl_head \u0026\u0026 strcmp(cgit_query_head, cgit_repo-\u003edefbranch))\n+\t\thtml_hidden(\u0022h\u0022, cgit_query_head);\n+\n+\tif (cgit_query_sha1)\n+\t\thtml_hidden(\u0022id\u0022, cgit_query_sha1);\n+\tif (cgit_query_sha2)\n+\t\thtml_hidden(\u0022id2\u0022, cgit_query_sha2);\n+\n+\tif (incl_search) {\n+\t\tif (cgit_query_grep)\n+\t\t\thtml_hidden(\u0022qt\u0022, cgit_query_grep);\n+\t\tif (cgit_query_search)\n+\t\t\thtml_hidden(\u0022q\u0022, cgit_query_search);\n+\t}\n }\n \n void cgit_print_pageheader(char *title, int show_search)\n {\n-\thtml(\u0022\u003ctable id\u003d'layout'\u003e\u0022);\n-\thtml(\u0022\u003ctr\u003e\u003ctd id\u003d'header'\u003e\u003ca href\u003d'\u0022);\n-\thtml_attr(cgit_rooturl());\n-\thtml(\u0022'\u003e\u0022);\n-\thtml_txt(cgit_root_title);\n-\thtml(\u0022\u003c/a\u003e\u003c/td\u003e\u003ctd id\u003d'logo'\u003e\u0022);\n+\tstatic const char *default_info \u003d \u0022This is cgit, a fast webinterface for git repositories\u0022;\n+\tint header \u003d 0;\n+\n+\thtml(\u0022\u003cdiv id\u003d'sidebar'\u003e\u005cn\u0022);\n \thtml(\u0022\u003ca href\u003d'\u0022);\n-\thtml_attr(cgit_logo_link);\n-\thtmlf(\u0022'\u003e\u003cimg src\u003d'%s' alt\u003d'logo'/\u003e\u003c/a\u003e\u0022, cgit_logo);\n-\thtml(\u0022\u003c/td\u003e\u003c/tr\u003e\u0022);\n-\thtml(\u0022\u003ctr\u003e\u003ctd id\u003d'crumb'\u003e\u0022);\n+\thtml_attr(cgit_rooturl());\n+\thtmlf(\u0022'\u003e\u003cdiv id\u003d'logo'\u003e\u003cimg src\u003d'%s' alt\u003d'cgit'/\u003e\u003c/div\u003e\u003c/a\u003e\u005cn\u0022,\n+\t cgit_logo);\n+\thtml(\u0022\u003cdiv class\u003d'infobox'\u003e\u0022);\n \tif (cgit_query_repo) {\n-\t\thtml_txt(cgit_repo-\u003ename);\n-\t\thtml(\u0022 (\u0022);\n-\t\thtml_txt(cgit_query_head);\n-\t\thtml(\u0022) : \u0026nbsp;\u0022);\n-\t\treporevlink(NULL, \u0022summary\u0022, NULL, NULL, cgit_query_head,\n+\t\thtml(\u0022\u003ch1\u003e\u0022);\n+\t\thtml_txt(strrpart(cgit_repo-\u003ename, 20));\n+\t\thtml(\u0022\u003c/h1\u003e\u005cn\u0022);\n+\t\thtml_txt(cgit_repo-\u003edesc);\n+\t\tif (cgit_repo-\u003eowner) {\n+\t\t\thtml(\u0022\u003cp\u003e\u005cn\u003ch1\u003eowner\u003c/h1\u003e\u005cn\u0022);\n+\t\t\thtml_txt(cgit_repo-\u003eowner);\n+\t\t}\n+\t\thtml(\u0022\u003cp\u003e\u005cn\u003ch1\u003enavigate\u003c/h1\u003e\u005cn\u0022);\n+\t\treporevlink(NULL, \u0022summary\u0022, NULL, \u0022menu\u0022, cgit_query_head,\n \t\t\t NULL, NULL);\n-\t\thtml(\u0022 \u0022);\n-\t\tcgit_log_link(\u0022log\u0022, NULL, NULL, cgit_query_head,\n+\t\tcgit_log_link(\u0022log\u0022, NULL, \u0022menu\u0022, cgit_query_head,\n \t\t\t cgit_query_sha1, cgit_query_path, 0);\n-\t\thtml(\u0022 \u0022);\n-\t\tcgit_tree_link(\u0022tree\u0022, NULL, NULL, cgit_query_head,\n+\t\tcgit_tree_link(\u0022tree\u0022, NULL, \u0022menu\u0022, cgit_query_head,\n \t\t\t cgit_query_sha1, NULL);\n-\t\thtml(\u0022 \u0022);\n-\t\tcgit_commit_link(\u0022commit\u0022, NULL, NULL, cgit_query_head,\n+\t\tcgit_commit_link(\u0022commit\u0022, NULL, \u0022menu\u0022, cgit_query_head,\n \t\t\t cgit_query_sha1);\n-\t\thtml(\u0022 \u0022);\n-\t\tcgit_diff_link(\u0022diff\u0022, NULL, NULL, cgit_query_head,\n+\t\tcgit_diff_link(\u0022diff\u0022, NULL, \u0022menu\u0022, cgit_query_head,\n \t\t\t cgit_query_sha1, cgit_query_sha2,\n \t\t\t cgit_query_path);\n-\t} else {\n-\t\thtml_txt(\u0022Index of repositories\u0022);\n-\t}\n-\thtml(\u0022\u003c/td\u003e\u0022);\n-\thtml(\u0022\u003ctd id\u003d'search'\u003e\u0022);\n-\tif (show_search) {\n+\n+\t\tfor_each_ref(print_archive_ref, \u0026header);\n+\n+\t\thtml(\u0022\u003cp\u003e\u005cn\u003ch1\u003ebranch\u003c/h1\u003e\u005cn\u0022);\n+\t\thtml(\u0022\u003cform method\u003d'get' action\u003d''\u003e\u005cn\u0022);\n+\t\tadd_hidden_formfields(0, 1);\n+\t\thtml(\u0022\u003cselect name\u003d'h' onchange\u003d'this.form.submit();'\u003e\u005cn\u0022);\n+\t\tfor_each_branch_ref(print_branch_option, cgit_query_head);\n+\t\thtml(\u0022\u003c/select\u003e\u005cn\u0022);\n+\t\thtml(\u0022\u003c/form\u003e\u005cn\u0022);\n+\n+\t\thtml(\u0022\u003cp\u003e\u005cn\u003ch1\u003esearch\u003c/h1\u003e\u005cn\u0022);\n \t\thtml(\u0022\u003cform method\u003d'get' action\u003d'\u0022);\n-\t\thtml_attr(cgit_currurl());\n-\t\thtml(\u0022'\u003e\u0022);\n-\t\tif (!cgit_virtual_root) {\n-\t\t\tif (cgit_query_repo)\n-\t\t\t\thtml_hidden(\u0022r\u0022, cgit_query_repo);\n-\t\t\tif (cgit_query_page)\n-\t\t\t\thtml_hidden(\u0022p\u0022, cgit_query_page);\n-\t\t}\n-\t\tif (cgit_query_head)\n-\t\t\thtml_hidden(\u0022h\u0022, cgit_query_head);\n-\t\tif (cgit_query_sha1)\n-\t\t\thtml_hidden(\u0022id\u0022, cgit_query_sha1);\n-\t\tif (cgit_query_sha2)\n-\t\t\thtml_hidden(\u0022id2\u0022, cgit_query_sha2);\n-\t\thtml(\u0022\u003cselect name\u003d'qt'\u003e\u0022);\n+\t\thtml_attr(cgit_pageurl(cgit_query_repo, \u0022log\u0022, NULL));\n+\t\thtml(\u0022'\u003e\u005cn\u0022);\n+\t\tadd_hidden_formfields(1, 0);\n+\t\thtml(\u0022\u003cselect name\u003d'qt'\u003e\u005cn\u0022);\n \t\thtml_option(\u0022grep\u0022, \u0022log msg\u0022, cgit_query_grep);\n \t\thtml_option(\u0022author\u0022, \u0022author\u0022, cgit_query_grep);\n \t\thtml_option(\u0022committer\u0022, \u0022committer\u0022, cgit_query_grep);\n-\t\thtml(\u0022\u003c/select\u003e\u0022);\n+\t\thtml(\u0022\u003c/select\u003e\u005cn\u0022);\n \t\thtml(\u0022\u003cinput class\u003d'txt' type\u003d'text' name\u003d'q' value\u003d'\u0022);\n \t\thtml_attr(cgit_query_search);\n-\t\thtml(\u0022'/\u003e\u003cinput class\u003d'btn' type\u003d'submit' value\u003d'...'/\u003e\u003c/form\u003e\u0022);\n+\t\thtml(\u0022'/\u003e\u005cn\u0022);\n+\t\thtml(\u0022\u003c/form\u003e\u005cn\u0022);\n+\t} else {\n+\t\tif (!cgit_index_info || html_include(cgit_index_info))\n+\t\t\thtml(default_info);\n \t}\n-\thtml(\u0022\u003c/td\u003e\u003c/tr\u003e\u0022);\n-\thtml(\u0022\u003ctr\u003e\u003ctd id\u003d'content' colspan\u003d'2'\u003e\u0022);\n+\n+\thtml(\u0022\u003c/div\u003e\u005cn\u0022);\n+\n+\thtml(\u0022\u003c/div\u003e\u005cn\u003ctable class\u003d'grid'\u003e\u003ctr\u003e\u003ctd id\u003d'content'\u003e\u005cn\u0022);\n }\n \n+\n void cgit_print_snapshot_start(const char *mimetype, const char *filename,\n \t\t\t struct cacheitem *item)\n {\ndiff --git a/ui-summary.c b/ui-summary.c\nindex ba90510..39fe330 100644\n--- a/ui-summary.c\n+++ b/ui-summary.c\n@@ -120,47 +120,6 @@ static int print_tag(struct refinfo *ref)\n \treturn 0;\n }\n \n-static int cgit_print_archive_cb(const char *refname, const unsigned char *sha1,\n-\t\t\t\t int flags, void *cb_data)\n-{\n-\tstruct tag *tag;\n-\tstruct taginfo *info;\n-\tstruct object *obj;\n-\tchar buf[256], *url;\n-\tunsigned char fileid[20];\n-\n-\tif (prefixcmp(refname, \u0022refs/archives\u0022))\n-\t\treturn 0;\n-\tstrncpy(buf, refname+14, sizeof(buf));\n-\tobj \u003d parse_object(sha1);\n-\tif (!obj)\n-\t\treturn 1;\n-\tif (obj-\u003etype \u003d\u003d OBJ_TAG) {\n-\t\ttag \u003d lookup_tag(sha1);\n-\t\tif (!tag || parse_tag(tag) || !(info \u003d cgit_parse_tag(tag)))\n-\t\t\treturn 0;\n-\t\thashcpy(fileid, tag-\u003etagged-\u003esha1);\n-\t} else if (obj-\u003etype !\u003d OBJ_BLOB) {\n-\t\treturn 0;\n-\t} else {\n-\t\thashcpy(fileid, sha1);\n-\t}\n-\tif (!header) {\n-\t\thtml(\u0022\u003ctable id\u003d'downloads'\u003e\u0022);\n-\t\thtml(\u0022\u003ctr\u003e\u003cth\u003eDownloads\u003c/th\u003e\u003c/tr\u003e\u0022);\n-\t\theader \u003d 1;\n-\t}\n-\thtml(\u0022\u003ctr\u003e\u003ctd\u003e\u0022);\n-\turl \u003d cgit_pageurl(cgit_query_repo, \u0022blob\u0022,\n-\t\t\t fmt(\u0022id\u003d%s\u0026amp;path\u003d%s\u0022, sha1_to_hex(fileid),\n-\t\t\t buf));\n-\thtml_link_open(url, NULL, NULL);\n-\thtml_txt(buf);\n-\thtml_link_close();\n-\thtml(\u0022\u003c/td\u003e\u003c/tr\u003e\u0022);\n-\treturn 0;\n-}\n-\n static void print_refs_link(char *path)\n {\n \thtml(\u0022\u003ctr class\u003d'nohover'\u003e\u003ctd colspan\u003d'4'\u003e\u0022);\n@@ -221,28 +180,16 @@ void cgit_print_tags(int maxcount)\n \t\tprint_refs_link(\u0022tags\u0022);\n }\n \n-static void cgit_print_archives()\n-{\n-\theader \u003d 0;\n-\tfor_each_ref(cgit_print_archive_cb, NULL);\n-\tif (header)\n-\t\thtml(\u0022\u003c/table\u003e\u0022);\n-}\n-\n void cgit_print_summary()\n {\n-\thtml(\u0022\u003cdiv id\u003d'summary'\u003e\u0022);\n-\tcgit_print_archives();\n-\thtml(\u0022\u003ch2\u003e\u0022);\n-\thtml_txt(cgit_repo-\u003ename);\n-\thtml(\u0022 - \u0022);\n-\thtml_txt(cgit_repo-\u003edesc);\n-\thtml(\u0022\u003c/h2\u003e\u0022);\n-\tif (cgit_repo-\u003ereadme)\n+\tif (cgit_repo-\u003ereadme) {\n+\t\thtml(\u0022\u003cdiv id\u003d'summary'\u003e\u0022);\n \t\thtml_include(cgit_repo-\u003ereadme);\n-\thtml(\u0022\u003c/div\u003e\u0022);\n+\t\thtml(\u0022\u003c/div\u003e\u0022);\n+\t}\n \tif (cgit_summary_log \u003e 0)\n-\t\tcgit_print_log(cgit_query_head, 0, cgit_summary_log, NULL, NULL, NULL, 0);\n+\t\tcgit_print_log(cgit_query_head, 0, cgit_summary_log, NULL,\n+\t\t\t NULL, NULL, 0);\n \thtml(\u0022\u003ctable class\u003d'list nowrap'\u003e\u0022);\n \tif (cgit_summary_log \u003e 0)\n \t\thtml(\u0022\u003ctr class\u003d'nohover'\u003e\u003ctd colspan\u003d'4'\u003e\u0026nbsp;\u003c/td\u003e\u003c/tr\u003e\u0022);\n","s":{"c":1747279890,"u": 2395}}
],"g": 3477,"chitpc": 0,"ehitpc": 0,"indexed":0
,
"ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "0000"}