{"schema":"libjg2-1",
"vpath":"/git/",
"avatar":"/git/avatar/",
"alang":"",
"gen_ut":1765676256,
"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":"b425db4bf6e5b0831b2cdab4c63e9fa8",
"commit": {"type":"commit",
"time": 1208083724,
"time_ofs": 120,
"oid_tree": { "oid": "22445a77f5b87280ec980f9b4da5a511f1f27faf", "alias": []},
"oid":{ "oid": "76ba6287bfb533baca7285b107b5d975581d449d", "alias": []},
"msg": "Merge branch 'lh/layout'",
"sig_commit": { "git_time": { "time": 1208083724, "offset": 120 }, "name": "Lars Hjemli", "email": "hjemli@gmail.com", "md5": "3b0d25799af76340d36a521e61d1f464" },
"sig_author": { "git_time": { "time": 1208083724, "offset": 120 }, "name": "Lars Hjemli", "email": "hjemli@gmail.com", "md5": "3b0d25799af76340d36a521e61d1f464" }},
"body": "Merge branch 'lh/layout'\n\n* lh/layout:\n Make repository search case insensitive\n Remove 'patch' link from tab, add to commit view\n Implement minimal freetext search in the repolist\n More layout fixes\n Minor fixup in tree-view css\n Reintroduce the branch switcher\n Add fixed link to index page from repo header\n Include diff in commit view\n Replace sidebar/logo\n"
,
"diff": "diff --git a/cgit.css b/cgit.css\nindex 17c2712..8f3d00c 100644\n--- a/cgit.css\n+++ b/cgit.css\n@@ -11,142 +11,141 @@ body {\n \tpadding: 4px;\n }\n \n+a {\n+\tcolor: blue;\n+\ttext-decoration: none;\n+}\n+\n+a:hover {\n+\ttext-decoration: underline;\n+}\n+\n table {\n border-collapse: collapse;\n }\n \n-h2 {\n-\tfont-size: 120%;\n-\tfont-weight: bold;\n-\tmargin-top: 0em;\n-\tmargin-bottom: 0.25em;\n+table#header {\n+\twidth: 100%;\n+\tmargin-bottom: 1em;\n }\n \n-h3 {\n-\tmargin-top: 0em;\n-\tfont-size: 100%;\n-\tfont-weight: normal;\n+table#header td.logo {\n+\twidth: 96px;\n }\n \n-h4 {\n-\tmargin-top: 1.5em;\n-\tmargin-bottom: 0.1em;\n-\tfont-size: 100%;\n-\tfont-weight: bold;\n+table#header td.main {\n+\tfont-size: 250%;\n+\tpadding-left: 10px;\n }\n \n-a {\n-\tcolor: #600;\n-\ttext-decoration: none;\n+table#header td.main a {\n+\tcolor: #000;\n }\n \n-a:hover {\n-\tbackground-color: #ddd;\n-\ttext-decoration: none;\n+table#header td.form {\n+\ttext-align: right;\n+\tvertical-align: bottom;\n+\tpadding-right: 1em;\n+\tpadding-bottom: 2px;\n }\n \n-table.list {\n-\tborder: none;\n-\tborder-collapse: collapse;\n+table#header td.form form,\n+table#header td.form input,\n+table#header td.form select {\n+\tfont-size: 90%;\n }\n \n-table.list tr {\n-\tbackground: white;\n+table#header td.sub {\n+\tcolor: #777;\n+\tborder-top: solid 1px #ccc;\n+\tpadding-left: 10px;\n }\n \n-table.list tr:hover {\n-\tbackground: #f8f8f8;\n+table.tabs {\n+\t/* border-bottom: solid 2px #ccc; */\n+\tborder-collapse: collapse;\n+\tmargin-top: 2em;\n+\tmargin-bottom: 0px;\n+\twidth: 100%;\n }\n \n-table.list tr.nohover:hover {\n-\tbackground: white;\n+table.tabs td {\n+\tpadding: 0px 1em;\n+\tvertical-align: bottom;\n }\n \n-table.list th {\n-\tfont-weight: bold;\n-\tborder-bottom: solid 1px #777;\n-\tpadding: 0.1em 0.5em 0.1em 0.5em;\n-\tvertical-align: baseline;\n+table.tabs td a {\n+\tpadding: 2px 0.75em;\n+\tcolor: #777;\n+\tfont-size: 110%;\n }\n \n-table.list td {\n-\tborder: none;\n-\tpadding: 0.1em 0.5em 0.1em 0.5em;\n+table.tabs td a.active {\n+\tcolor: #000;\n+\tbackground-color: #ccc;\n }\n \n-img {\n-\tborder: none;\n+table.tabs td.form {\n+\ttext-align: right;\n }\n \n-table#layout {\n-\tborder-collapse: collapse;\n-\tborder: none;\n-\tmargin: 0px;\n+table.tabs td.form form {\n+\tpadding-bottom: 2px;\n+\tfont-size: 90%;\n }\n \n-td#sidebar {\n-\tvertical-align: top;\n-\twidth: 162px;\n-\tpadding: 0px 0px 0px 0px;\n-\tmargin: 0px;\n+table.tabs td.form input,\n+table.tabs td.form select {\n+\tfont-size: 90%;\n }\n \n-td#sidebar table {\n-\tborder-collapse: separate;\n-\tborder-spacing: 0px;\n+div.content {\n \tmargin: 0px;\n-\tpadding: 0px;\n-\tbackground-color: #ccc;\n+\tpadding: 2em;\n+\tborder-top: solid 3px #ccc;\n+\tborder-bottom: solid 3px #ccc;\n }\n \n-td#sidebar table.sidebar td.sidebar {\n-\tpadding: 4px;\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+table.list {\n+\twidth: 100%;\n+\tborder: none;\n+\tborder-collapse: collapse;\n }\n \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+table.list tr {\n+\tbackground: white;\n }\n \n-td#sidebar h1 {\n-\tfont-size: 10pt;\n-\tfont-weight: bold;\n-\tmargin: 8px 0px 0px 0px;\n+table.list tr:hover {\n+\tbackground: #eee;\n }\n \n-td#sidebar h1.first {\n-\tmargin-top: 0px;\n+table.list tr.nohover:hover {\n+\tbackground: white;\n }\n \n-td#sidebar a.menu {\n-\tdisplay: block;\n-\tbackground-color: #ccc;\n-\tpadding: 0.1em 0.5em;\n-\ttext-decoration: none;\n+table.list th {\n+\tfont-weight: bold;\n+\t/* color: #888;\n+\tborder-top: dashed 1px #888;\n+\tborder-bottom: dashed 1px #888;\n+\t*/\n+\tpadding: 0.1em 0.5em 0.05em 0.5em;\n+\tvertical-align: baseline;\n }\n \n-td#sidebar a.menu:hover {\n-\tbackground-color: #bbb;\n-\ttext-decoration: none;\n+table.list td {\n+\tborder: none;\n+\tpadding: 0.1em 0.5em 0.1em 0.5em;\n }\n \n-td#sidebar select {\n-\twidth: 100%;\n-\tmargin: 2px 0px 0px 0px;\n+table.list td a {\n+\tcolor: black;\n }\n \n-td#sidebar form {\n-\ttext-align: right;\n+img {\n+\tborder: none;\n }\n \n input#switch-btn {\n@@ -201,14 +200,13 @@ a.ls-blob, a.ls-dir, a.ls-mod {\n \n td.ls-size {\n \ttext-align: right;\n-}\n-\n-td.ls-size {\n \tfont-family: monospace;\n+\twidth: 10em;\n }\n \n td.ls-mode {\n \tfont-family: monospace;\n+\twidth: 10em;\n }\n \n table.blob {\n@@ -357,7 +355,7 @@ table.diff td {\n table.diff td div.head {\n \tfont-weight: bold;\n \tmargin-top: 1em;\n-\tbackground-color: #eee;\n+\tcolor: black;\n }\n \n table.diff td div.hunk {\n@@ -392,17 +390,17 @@ table.list td.repogroup {\n \n a.button {\n \tfont-size: 80%;\n-\tcolor: #aaa;\n+\tcolor: #33c;\n+/*\n \tbackground-color: #eee;\n \tborder: solid 1px #aaa;\n-\tpadding: 0em 0.5em;\n \tmargin: 0.1em 0.25em;\n+*/\n+\tpadding: 0em 0.5em;\n }\n \n a.button:hover {\n-\ttext-decoration: none;\n-\tcolor: #333;\n-\tbackground-color: #ccc;\n+\ttext-decoration: underline;\n }\n \n a.primary {\ndiff --git a/cgit.h b/cgit.h\nindex ee8c716..a3b6535 100644\n--- a/cgit.h\n+++ b/cgit.h\n@@ -221,4 +221,11 @@ extern const char *cgit_repobasename(const char *reponame);\n \n extern int cgit_parse_snapshots_mask(const char *str);\n \n+/* libgit.a either links against or compiles its own implementation of\n+ * strcasestr(), and we'd like to reuse it. Simply re-declaring it\n+ * seems to do the trick.\n+ */\n+extern char *strcasestr(const char *haystack, const char *needle);\n+\n+\n #endif /* CGIT_H */\ndiff --git a/cgit.png b/cgit.png\nindex 22f7e95..d7f70bc 100644\nBinary files a/cgit.png and b/cgit.png differ\ndiff --git a/ui-commit.c b/ui-commit.c\nindex 8019e36..dd36cc0 100644\n--- a/ui-commit.c\n+++ b/ui-commit.c\n@@ -9,6 +9,7 @@\n #include \u0022cgit.h\u0022\n #include \u0022html.h\u0022\n #include \u0022ui-shared.h\u0022\n+#include \u0022ui-diff.h\u0022\n \n static int files, slots;\n static int total_adds, total_rems, max_changes;\n@@ -174,6 +175,12 @@ void cgit_print_commit(char *hex)\n \thtml(\u0022\u003c/td\u003e\u003ctd class\u003d'right'\u003e\u0022);\n \tcgit_print_date(info-\u003ecommitter_date, FMT_LONGDATE);\n \thtml(\u0022\u003c/td\u003e\u003c/tr\u003e\u005cn\u0022);\n+\thtml(\u0022\u003ctr\u003e\u003cth\u003ecommit\u003c/th\u003e\u003ctd colspan\u003d'2' class\u003d'sha1'\u003e\u0022);\n+\ttmp \u003d sha1_to_hex(commit-\u003eobject.sha1);\n+\tcgit_commit_link(tmp, NULL, NULL, ctx.qry.head, tmp);\n+\thtml(\u0022 (\u0022);\n+\tcgit_patch_link(\u0022patch\u0022, NULL, NULL, NULL, tmp);\n+\thtml(\u0022)\u003c/td\u003e\u003c/tr\u003e\u005cn\u0022);\n \thtml(\u0022\u003ctr\u003e\u003cth\u003etree\u003c/th\u003e\u003ctd colspan\u003d'2' class\u003d'sha1'\u003e\u0022);\n \ttmp \u003d xstrdup(hex);\n \tcgit_tree_link(sha1_to_hex(commit-\u003etree-\u003eobject.sha1), NULL, NULL,\n@@ -218,10 +225,11 @@ void cgit_print_commit(char *hex)\n \t\t\tprint_fileinfo(\u0026items[i]);\n \t\thtml(\u0022\u003c/table\u003e\u0022);\n \t\thtml(\u0022\u003cdiv class\u003d'diffstat-summary'\u003e\u0022);\n-\t\thtmlf(\u0022%d files changed, %d insertions, %d deletions (\u0022,\n+\t\thtmlf(\u0022%d files changed, %d insertions, %d deletions\u0022,\n \t\t files, total_adds, total_rems);\n-\t\tcgit_diff_link(\u0022show diff\u0022, NULL, NULL, ctx.qry.head, hex,\n-\t\t\t NULL, NULL);\n+\t\tcgit_print_diff(ctx.qry.sha1,\n+\t\t\t\tsha1_to_hex(commit-\u003eparents-\u003eitem-\u003eobject.sha1),\n+\t\t\t\tNULL);\n \t\thtml(\u0022)\u003c/div\u003e\u0022);\n \t}\n \tcgit_free_commitinfo(info);\ndiff --git a/ui-repolist.c b/ui-repolist.c\nindex eeeaf3d..7a7e95a 100644\n--- a/ui-repolist.c\n+++ b/ui-repolist.c\n@@ -44,20 +44,23 @@ static void print_modtime(struct cgit_repo *repo)\n \tcgit_print_age(s.st_mtime, -1, NULL);\n }\n \n-void cgit_print_repolist()\n+int is_match(struct cgit_repo *repo)\n {\n-\tint i, columns \u003d 4;\n-\tchar *last_group \u003d NULL;\n-\n-\tif (ctx.cfg.enable_index_links)\n-\t\tcolumns++;\n-\n-\tctx.page.title \u003d ctx.cfg.root_title;\n-\tcgit_print_http_headers(\u0026ctx);\n-\tcgit_print_docstart(\u0026ctx);\n-\tcgit_print_pageheader(\u0026ctx);\n+\tif (!ctx.qry.search)\n+\t\treturn 1;\n+\tif (repo-\u003eurl \u0026\u0026 strcasestr(repo-\u003eurl, ctx.qry.search))\n+\t\treturn 1;\n+\tif (repo-\u003ename \u0026\u0026 strcasestr(repo-\u003ename, ctx.qry.search))\n+\t\treturn 1;\n+\tif (repo-\u003edesc \u0026\u0026 strcasestr(repo-\u003edesc, ctx.qry.search))\n+\t\treturn 1;\n+\tif (repo-\u003eowner \u0026\u0026 strcasestr(repo-\u003eowner, ctx.qry.search))\n+\t\treturn 1;\n+\treturn 0;\n+}\n \n-\thtml(\u0022\u003ctable summary\u003d'repository list' class\u003d'list nowrap'\u003e\u0022);\n+void print_header(int columns)\n+{\n \tif (ctx.cfg.index_header) {\n \t\thtmlf(\u0022\u003ctr class\u003d'nohover'\u003e\u003ctd colspan\u003d'%d' class\u003d'include-block'\u003e\u0022,\n \t\t columns);\n@@ -70,11 +73,31 @@ void cgit_print_repolist()\n \t \u0022\u003cth class\u003d'left'\u003eOwner\u003c/th\u003e\u0022\n \t \u0022\u003cth class\u003d'left'\u003eIdle\u003c/th\u003e\u0022);\n \tif (ctx.cfg.enable_index_links)\n-\t\thtml(\u0022\u003cth\u003eLinks\u003c/th\u003e\u0022);\n+\t\thtml(\u0022\u003cth class\u003d'left'\u003eLinks\u003c/th\u003e\u0022);\n \thtml(\u0022\u003c/tr\u003e\u005cn\u0022);\n+}\n \n+void cgit_print_repolist()\n+{\n+\tint i, columns \u003d 4, hits \u003d 0, header \u003d 0;\n+\tchar *last_group \u003d NULL;\n+\n+\tif (ctx.cfg.enable_index_links)\n+\t\tcolumns++;\n+\n+\tctx.page.title \u003d ctx.cfg.root_title;\n+\tcgit_print_http_headers(\u0026ctx);\n+\tcgit_print_docstart(\u0026ctx);\n+\tcgit_print_pageheader(\u0026ctx);\n+\n+\thtml(\u0022\u003ctable summary\u003d'repository list' class\u003d'list nowrap'\u003e\u0022);\n \tfor (i\u003d0; i\u003ccgit_repolist.count; i++) {\n \t\tctx.repo \u003d \u0026cgit_repolist.repos[i];\n+\t\tif (!is_match(ctx.repo))\n+\t\t\tcontinue;\n+\t\tif (!header++)\n+\t\t\tprint_header(columns);\n+\t\thits++;\n \t\tif ((last_group \u003d\u003d NULL \u0026\u0026 ctx.repo-\u003egroup !\u003d NULL) ||\n \t\t (last_group !\u003d NULL \u0026\u0026 ctx.repo-\u003egroup \u003d\u003d NULL) ||\n \t\t (last_group !\u003d NULL \u0026\u0026 ctx.repo-\u003egroup !\u003d NULL \u0026\u0026\n@@ -110,5 +133,7 @@ void cgit_print_repolist()\n \t\thtml(\u0022\u003c/tr\u003e\u005cn\u0022);\n \t}\n \thtml(\u0022\u003c/table\u003e\u0022);\n+\tif (!hits)\n+\t\tcgit_print_error(\u0022No repositories found\u0022);\n \tcgit_print_docend();\n }\ndiff --git a/ui-shared.c b/ui-shared.c\nindex aa65988..bb08c4a 100644\n--- a/ui-shared.c\n+++ b/ui-shared.c\n@@ -7,6 +7,7 @@\n */\n \n #include \u0022cgit.h\u0022\n+#include \u0022cmd.h\u0022\n #include \u0022html.h\u0022\n \n const char cgit_doctype[] \u003d\n@@ -388,7 +389,7 @@ void cgit_print_docstart(struct cgit_context *ctx)\n \n void cgit_print_docend()\n {\n-\thtml(\u0022\u003c/td\u003e\u005cn\u003c/tr\u003e\u005cn\u003c/table\u003e\u005cn\u003c/body\u003e\u005cn\u003c/html\u003e\u005cn\u0022);\n+\thtml(\u0022\u003c/div\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@@ -465,75 +466,83 @@ void add_hidden_formfields(int incl_head, int incl_search, char *page)\n \t}\n }\n \n+char *hc(struct cgit_cmd *cmd, const char *page)\n+{\n+\treturn (strcmp(cmd-\u003ename, page) ? NULL : \u0022active\u0022);\n+}\n+\n void cgit_print_pageheader(struct cgit_context *ctx)\n {\n-\tstatic const char *default_info \u003d \u0022This is cgit, a fast webinterface for git repositories\u0022;\n-\tint header \u003d 0;\n-\tchar *url;\n+\tstruct cgit_cmd *cmd \u003d cgit_get_cmd(ctx);\n \n-\thtml(\u0022\u003ctable id\u003d'layout' summary\u003d''\u003e\u005cn\u0022);\n-\thtml(\u0022\u003ctr\u003e\u003ctd id\u003d'sidebar'\u003e\u005cn\u0022);\n-\thtml(\u0022\u003ctable class\u003d'sidebar' cellspacing\u003d'0' summary\u003d''\u003e\u005cn\u0022);\n-\thtml(\u0022\u003ctr\u003e\u003ctd class\u003d'sidebar'\u003e\u005cn\u003ca href\u003d'\u0022);\n-\thtml_attr(cgit_rooturl());\n-\thtmlf(\u0022'\u003e\u003cimg src\u003d'%s' alt\u003d'cgit'/\u003e\u003c/a\u003e\u005cn\u0022,\n-\t ctx-\u003ecfg.logo);\n-\thtml(\u0022\u003c/td\u003e\u003c/tr\u003e\u005cn\u003ctr\u003e\u003ctd class\u003d'sidebar'\u003e\u005cn\u0022);\n-\tif (ctx-\u003erepo) {\n-\t\thtml(\u0022\u003ch1 class\u003d'first'\u003e\u0022);\n-\t\thtml_txt(strrpart(ctx-\u003erepo-\u003ename, 20));\n-\t\thtml(\u0022\u003c/h1\u003e\u005cn\u0022);\n-\t\thtml_txt(ctx-\u003erepo-\u003edesc);\n-\t\tif (ctx-\u003erepo-\u003eowner) {\n-\t\t\thtml(\u0022\u003ch1\u003eowner\u003c/h1\u003e\u005cn\u0022);\n-\t\t\thtml_txt(ctx-\u003erepo-\u003eowner);\n-\t\t}\n-\t\thtml(\u0022\u003ch1\u003enavigate\u003c/h1\u003e\u005cn\u0022);\n-\t\treporevlink(NULL, \u0022summary\u0022, NULL, \u0022menu\u0022, ctx-\u003eqry.head,\n-\t\t\t NULL, NULL);\n-\t\tcgit_log_link(\u0022log\u0022, NULL, \u0022menu\u0022, ctx-\u003eqry.head, NULL, NULL,\n-\t\t\t 0, NULL, NULL);\n-\t\tcgit_tree_link(\u0022tree\u0022, NULL, \u0022menu\u0022, ctx-\u003eqry.head,\n-\t\t\t ctx-\u003eqry.sha1, NULL);\n-\t\tcgit_commit_link(\u0022commit\u0022, NULL, \u0022menu\u0022, ctx-\u003eqry.head,\n-\t\t\t ctx-\u003eqry.sha1);\n-\t\tcgit_diff_link(\u0022diff\u0022, NULL, \u0022menu\u0022, ctx-\u003eqry.head,\n-\t\t\t ctx-\u003eqry.sha1, ctx-\u003eqry.sha2, NULL);\n-\t\tcgit_patch_link(\u0022patch\u0022, NULL, \u0022menu\u0022, ctx-\u003eqry.head,\n-\t\t\t\tctx-\u003eqry.sha1);\n-\n-\t\tfor_each_ref(print_archive_ref, \u0026header);\n-\n-\t\tif (ctx-\u003erepo-\u003eclone_url || ctx-\u003ecfg.clone_prefix) {\n-\t\t\thtml(\u0022\u003ch1\u003eclone\u003c/h1\u003e\u005cn\u0022);\n-\t\t\tif (ctx-\u003erepo-\u003eclone_url)\n-\t\t\t\turl \u003d ctx-\u003erepo-\u003eclone_url;\n-\t\t\telse\n-\t\t\t\turl \u003d fmt(\u0022%s%s\u0022, ctx-\u003ecfg.clone_prefix,\n-\t\t\t\t\t ctx-\u003erepo-\u003eurl);\n-\t\t\thtml(\u0022\u003ca class\u003d'menu' href\u003d'\u0022);\n-\t\t\thtml_attr(url);\n-\t\t\thtml(\u0022' title\u003d'\u0022);\n-\t\t\thtml_attr(url);\n-\t\t\thtml(\u0022'\u003e\u005cn\u0022);\n-\t\t\thtml_txt(strrpart(url, 20));\n-\t\t\thtml(\u0022\u003c/a\u003e\u005cn\u0022);\n-\t\t}\n+\thtml(\u0022\u003ctable id\u003d'header'\u003e\u005cn\u0022);\n+\thtml(\u0022\u003ctr\u003e\u005cn\u0022);\n+\thtml(\u0022\u003ctd class\u003d'logo' rowspan\u003d'2'\u003e\u003ca href\u003d'\u0022);\n+\tif (ctx-\u003ecfg.logo_link)\n+\t\thtml_attr(ctx-\u003ecfg.logo_link);\n+\telse\n+\t\thtml_attr(cgit_rooturl());\n+\thtml(\u0022'\u003e\u003cimg src\u003d'\u0022);\n+\thtml_attr(ctx-\u003ecfg.logo);\n+\thtml(\u0022'/\u003e\u003c/a\u003e\u003c/td\u003e\u005cn\u0022);\n \n-\t\thtml(\u0022\u003ch1\u003ebranch\u003c/h1\u003e\u005cn\u0022);\n+\thtml(\u0022\u003ctd class\u003d'main'\u003e\u0022);\n+\tif (ctx-\u003erepo) {\n+/*\n+\t\thtml(\u0022\u003ca href\u003d'\u0022);\n+\t\thtml_attr(cgit_rooturl());\n+\t\thtml(\u0022'\u003eindex\u003c/a\u003e : \u0022);\n+*/\n+\t\treporevlink(NULL, ctx-\u003erepo-\u003ename, NULL, hc(cmd, \u0022summary\u0022),\n+\t\t\t ctx-\u003eqry.head, NULL, NULL);\n+\t\thtml(\u0022 : \u0022);\n+\t\thtml_txt(ctx-\u003eqry.page);\n+\t\thtml(\u0022\u003c/td\u003e\u003ctd class\u003d'form'\u003e\u0022);\n \t\thtml(\u0022\u003cform method\u003d'get' action\u003d''\u003e\u005cn\u0022);\n \t\tadd_hidden_formfields(0, 1, ctx-\u003eqry.page);\n-//\t\thtml(\u0022\u003ctable summary\u003d'branch selector' class\u003d'grid'\u003e\u003ctr\u003e\u003ctd id\u003d'branch-dropdown-cell'\u003e\u0022);\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, ctx-\u003eqry.head);\n-\t\thtml(\u0022\u003c/select\u003e\u005cn\u0022);\n-//\t\thtml(\u0022\u003c/td\u003e\u003ctd\u003e\u0022);\n-\t\thtml(\u0022\u003cnoscript\u003e\u003cinput type\u003d'submit' id\u003d'switch-btn' value\u003d'switch'/\u003e\u003c/noscript\u003e\u005cn\u0022);\n-//\t\thtml(\u0022\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e\u0022);\n-\t\thtml(\u0022\u003c/form\u003e\u005cn\u0022);\n+\t\thtml(\u0022\u003c/select\u003e \u0022);\n+\t\thtml(\u0022\u003cinput type\u003d'submit' name\u003d'' value\u003d'switch'/\u003e\u0022);\n+\t\thtml(\u0022\u003c/form\u003e\u0022);\n+\t} else\n+\t\thtml_txt(ctx-\u003ecfg.root_title);\n+\thtml(\u0022\u003c/td\u003e\u005cn\u0022);\n+\n+\thtml(\u0022\u003ctr\u003e\u003ctd class\u003d'sub'\u0022);\n+\tif (ctx-\u003erepo) {\n+\t\thtml(\u0022 colspan\u003d'2'\u003e\u0022);\n+\t\thtml_txt(ctx-\u003erepo-\u003edesc);\n+\t}\n+/*\n+\telse if (ctx-\u003ecfg.root_subtitle)\n+\t\thtml_txt(ctx-\u003ecfg.root_subtitle);\n+*/\n+\telse {\n+\t\thtml(\u0022\u003e\u0022);\n+\t\thtml_txt(\u0022a fast webinterface for the git dscm\u0022);\n+\t}\n+\thtml(\u0022\u003c/td\u003e\u003c/tr\u003e\u005cn\u0022);\n \n-\t\thtml(\u0022\u003ch1\u003esearch\u003c/h1\u003e\u005cn\u0022);\n-\t\thtml(\u0022\u003cform method\u003d'get' action\u003d'\u0022);\n+\thtml(\u0022\u003c/tr\u003e\u005cn\u0022);\n+\thtml(\u0022\u003c/table\u003e\u005cn\u0022);\n+\n+\thtml(\u0022\u003ctable class\u003d'tabs'\u003e\u003ctr\u003e\u003ctd\u003e\u005cn\u0022);\n+\tif (ctx-\u003erepo) {\n+\t\treporevlink(NULL, \u0022summary\u0022, NULL, hc(cmd, \u0022summary\u0022),\n+\t\t\t ctx-\u003eqry.head, NULL, NULL);\n+\t\tcgit_refs_link(\u0022refs\u0022, NULL, hc(cmd, \u0022refs\u0022), ctx-\u003eqry.head,\n+\t\t\t ctx-\u003eqry.sha1, NULL);\n+\t\tcgit_log_link(\u0022log\u0022, NULL, hc(cmd, \u0022log\u0022), ctx-\u003eqry.head,\n+\t\t\t NULL, NULL, 0, NULL, NULL);\n+\t\tcgit_tree_link(\u0022tree\u0022, NULL, hc(cmd, \u0022tree\u0022), ctx-\u003eqry.head,\n+\t\t\t ctx-\u003eqry.sha1, NULL);\n+\t\tcgit_commit_link(\u0022commit\u0022, NULL, hc(cmd, \u0022commit\u0022),\n+\t\t\t\t ctx-\u003eqry.head, ctx-\u003eqry.sha1);\n+\t\tcgit_diff_link(\u0022diff\u0022, NULL, hc(cmd, \u0022diff\u0022), ctx-\u003eqry.head,\n+\t\t\t ctx-\u003eqry.sha1, ctx-\u003eqry.sha2, NULL);\n+\t\thtml(\u0022\u003c/td\u003e\u003ctd class\u003d'form'\u003e\u0022);\n+\t\thtml(\u0022\u003cform class\u003d'right' method\u003d'get' action\u003d'\u0022);\n \t\tif (ctx-\u003ecfg.virtual_root)\n \t\t\thtml_attr(cgit_fileurl(ctx-\u003eqry.repo, \u0022log\u0022,\n \t\t\t\t\t ctx-\u003eqry.path, NULL));\n@@ -544,18 +553,27 @@ void cgit_print_pageheader(struct cgit_context *ctx)\n \t\thtml_option(\u0022author\u0022, \u0022author\u0022, ctx-\u003eqry.grep);\n \t\thtml_option(\u0022committer\u0022, \u0022committer\u0022, ctx-\u003eqry.grep);\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(\u0022\u003cinput class\u003d'txt' type\u003d'text' size\u003d'10' name\u003d'q' value\u003d'\u0022);\n \t\thtml_attr(ctx-\u003eqry.search);\n \t\thtml(\u0022'/\u003e\u005cn\u0022);\n+\t\thtml(\u0022\u003cinput type\u003d'submit' value\u003d'search'/\u003e\u005cn\u0022);\n \t\thtml(\u0022\u003c/form\u003e\u005cn\u0022);\n \t} else {\n-\t\tif (!ctx-\u003ecfg.index_info || html_include(ctx-\u003ecfg.index_info))\n-\t\t\thtml(default_info);\n+\t\thtml(\u0022\u003ca class\u003d'active' href\u003d'\u0022);\n+\t\thtml_attr(cgit_rooturl());\n+\t\thtml(\u0022'\u003eindex\u003c/a\u003e\u005cn\u0022);\n+\t\thtml(\u0022\u003c/td\u003e\u003ctd class\u003d'form'\u003e\u0022);\n+\t\thtml(\u0022\u003cform method\u003d'get' action\u003d'\u0022);\n+\t\thtml_attr(cgit_rooturl());\n+\t\thtml(\u0022'\u003e\u005cn\u0022);\n+\t\thtml(\u0022\u003cinput type\u003d'text' name\u003d'q' size\u003d'10' value\u003d'\u0022);\n+\t\thtml_attr(ctx-\u003eqry.search);\n+\t\thtml(\u0022'/\u003e\u005cn\u0022);\n+\t\thtml(\u0022\u003cinput type\u003d'submit' value\u003d'search'/\u003e\u005cn\u0022);\n+\t\thtml(\u0022\u003c/form\u003e\u0022);\n \t}\n-\n-\thtml(\u0022\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e\u003c/td\u003e\u005cn\u0022);\n-\n-\thtml(\u0022\u003ctd id\u003d'content'\u003e\u005cn\u0022);\n+\thtml(\u0022\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e\u005cn\u0022);\n+\thtml(\u0022\u003cdiv class\u003d'content'\u003e\u0022);\n }\n \n void cgit_print_filemode(unsigned short mode)\ndiff --git a/ui-shared.h b/ui-shared.h\nindex 94de884..76c2b1f 100644\n--- a/ui-shared.h\n+++ b/ui-shared.h\n@@ -14,6 +14,8 @@ extern void cgit_log_link(char *name, char *title, char *class, char *head,\n \t\t\t char *pattern);\n extern void cgit_commit_link(char *name, char *title, char *class, char *head,\n \t\t\t char *rev);\n+extern void cgit_patch_link(char *name, char *title, char *class, char *head,\n+\t\t\t char *rev);\n extern void cgit_refs_link(char *name, char *title, char *class, char *head,\n \t\t\t char *rev, char *path);\n extern void cgit_snapshot_link(char *name, char *title, char *class,\n","s":{"c":1765676256,"u": 2008}}
],"g": 4484,"chitpc": 0,"ehitpc": 0,"indexed":0
,
"ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "0000"}