{"schema":"libjg2-1",
"vpath":"/git/",
"avatar":"/git/avatar/",
"alang":"",
"gen_ut":1745907437,
"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":"cef8b398b8b055702408820a2e6adc47",
"commit": {"type":"commit",
"time": 1530115879,
"time_ofs": 120,
"oid_tree": { "oid": "69fb78b50ecb692deac12a2513cefba71e1d3698", "alias": []},
"oid":{ "oid": "bd1b281478c8d8ab45f723ac5818d58da4a64dd1", "alias": []},
"msg": "ui-shared: pass repo object to print_snapshot_links()",
"sig_commit": { "git_time": { "time": 1530115879, "offset": 120 }, "name": "Jason A. Donenfeld", "email": "Jason@zx2c4.com", "md5": "689e78dac56e3d77d7f74984912487d3" },
"sig_author": { "git_time": { "time": 1522501502, "offset": 60 }, "name": "John Keeping", "email": "john@keeping.me.uk", "md5": "aea7d8738c91da1cb0dfa9d86f2bbc47" }},
"body": "ui-shared: pass repo object to print_snapshot_links()\n\nBoth call sites of cgit_print_snapshot_links() use the same values for\nthe snapshot mask and repository name, which are derived from the\ncgit_repo structure so let's pass in the structure and access the fields\ndirectly.\n\nSigned-off-by: John Keeping \u003cjohn@keeping.me.uk\u003e\nReviewed-by: Christian Hesse \u003cmail@eworm.de\u003e\n"
,
"diff": "diff --git a/ui-commit.c b/ui-commit.c\nindex abf58f6..ea17461 100644\n--- a/ui-commit.c\n+++ b/ui-commit.c\n@@ -110,8 +110,7 @@ void cgit_print_commit(char *hex, const char *prefix)\n \t}\n \tif (ctx.repo-\u003esnapshots) {\n \t\thtml(\u0022\u003ctr\u003e\u003cth\u003edownload\u003c/th\u003e\u003ctd colspan\u003d'2' class\u003d'sha1'\u003e\u0022);\n-\t\tcgit_print_snapshot_links(ctx.qry.repo, ctx.qry.head,\n-\t\t\t\t\t hex, ctx.repo-\u003esnapshots);\n+\t\tcgit_print_snapshot_links(ctx.repo, ctx.qry.head, hex);\n \t\thtml(\u0022\u003c/td\u003e\u003c/tr\u003e\u0022);\n \t}\n \thtml(\u0022\u003c/table\u003e\u005cn\u0022);\ndiff --git a/ui-shared.c b/ui-shared.c\nindex 0c6ca60..e719c1b 100644\n--- a/ui-shared.c\n+++ b/ui-shared.c\n@@ -1103,17 +1103,17 @@ void cgit_compose_snapshot_prefix(struct strbuf *filename, const char *base,\n \tstrbuf_addf(filename, \u0022%s-%s\u0022, base, ref);\n }\n \n-void cgit_print_snapshot_links(const char *repo, const char *head,\n-\t\t\t const char *hex, int snapshots)\n+void cgit_print_snapshot_links(const struct cgit_repo *repo, const char *head,\n+\t\t\t const char *hex)\n {\n \tconst struct cgit_snapshot_format* f;\n \tstruct strbuf filename \u003d STRBUF_INIT;\n \tsize_t prefixlen;\n \n-\tcgit_compose_snapshot_prefix(\u0026filename, cgit_repobasename(repo), hex);\n+\tcgit_compose_snapshot_prefix(\u0026filename, cgit_repobasename(repo-\u003eurl), hex);\n \tprefixlen \u003d filename.len;\n \tfor (f \u003d cgit_snapshot_formats; f-\u003esuffix; f++) {\n-\t\tif (!(snapshots \u0026 f-\u003ebit))\n+\t\tif (!(repo-\u003esnapshots \u0026 f-\u003ebit))\n \t\t\tcontinue;\n \t\tstrbuf_setlen(\u0026filename, prefixlen);\n \t\tstrbuf_addstr(\u0026filename, f-\u003esuffix);\ndiff --git a/ui-shared.h b/ui-shared.h\nindex b760a17..b3eb8c5 100644\n--- a/ui-shared.h\n+++ b/ui-shared.h\n@@ -76,8 +76,8 @@ extern void cgit_print_pageheader(void);\n extern void cgit_print_filemode(unsigned short mode);\n extern void cgit_compose_snapshot_prefix(struct strbuf *filename,\n \t\t\t\t\t const char *base, const char *ref);\n-extern void cgit_print_snapshot_links(const char *repo, const char *head,\n-\t\t\t\t const char *hex, int snapshots);\n+extern void cgit_print_snapshot_links(const struct cgit_repo *repo,\n+\t\t\t\t const char *head, const char *hex);\n extern void cgit_add_hidden_formfields(int incl_head, int incl_search,\n \t\t\t\t const char *page);\n \ndiff --git a/ui-tag.c b/ui-tag.c\nindex 2c216d0..89a46f9 100644\n--- a/ui-tag.c\n+++ b/ui-tag.c\n@@ -34,8 +34,7 @@ static void print_tag_content(char *buf)\n static void print_download_links(char *revname)\n {\n \thtml(\u0022\u003ctr\u003e\u003cth\u003edownload\u003c/th\u003e\u003ctd class\u003d'sha1'\u003e\u0022);\n-\tcgit_print_snapshot_links(ctx.qry.repo, ctx.qry.head,\n-\t\t\t\t revname, ctx.repo-\u003esnapshots);\n+\tcgit_print_snapshot_links(ctx.repo, ctx.qry.head, revname);\n \thtml(\u0022\u003c/td\u003e\u003c/tr\u003e\u0022);\n }\n \n","s":{"c":1745907437,"u": 1392}}
],"g": 2264,"chitpc": 0,"ehitpc": 0,"indexed":0
,
"ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "0000"}