{"schema":"libjg2-1",
"vpath":"/git/",
"avatar":"/git/avatar/",
"alang":"",
"gen_ut":1745906350,
"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":"7b3e9e5ad20926fc0d0d54f982332afb",
"commit": {"type":"commit",
"time": 1530115879,
"time_ofs": 120,
"oid_tree": { "oid": "90e9efd9388639875d695fa12323270f10490bef", "alias": []},
"oid":{ "oid": "d85e8a9810cbfbe5cfe80509a7b47cb39483e6ac", "alias": []},
"msg": "ui-snapshot: pass repo into get_ref_from_filename()",
"sig_commit": { "git_time": { "time": 1530115879, "offset": 120 }, "name": "Jason A. Donenfeld", "email": "Jason@zx2c4.com", "md5": "689e78dac56e3d77d7f74984912487d3" },
"sig_author": { "git_time": { "time": 1522505937, "offset": 60 }, "name": "John Keeping", "email": "john@keeping.me.uk", "md5": "aea7d8738c91da1cb0dfa9d86f2bbc47" }},
"body": "ui-snapshot: pass repo into get_ref_from_filename()\n\nPrepare to allow a custom snapshot prefix.\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-snapshot.c b/ui-snapshot.c\nindex b2d95f7..237a75f 100644\n--- a/ui-snapshot.c\n+++ b/ui-snapshot.c\n@@ -139,7 +139,8 @@ static int make_snapshot(const struct cgit_snapshot_format *format,\n * pending a 'v' or a 'V' to the remaining snapshot name (\u00220.7.2\u0022 -\u003e\n * \u0022v0.7.2\u0022) gives us something valid.\n */\n-static const char *get_ref_from_filename(const char *url, const char *filename,\n+static const char *get_ref_from_filename(const struct cgit_repo *repo,\n+\t\t\t\t\t const char *filename,\n \t\t\t\t\t const struct cgit_snapshot_format *format)\n {\n \tconst char *reponame;\n@@ -153,7 +154,7 @@ static const char *get_ref_from_filename(const char *url, const char *filename,\n \tif (get_oid(snapshot.buf, \u0026oid) \u003d\u003d 0)\n \t\tgoto out;\n \n-\treponame \u003d cgit_repobasename(url);\n+\treponame \u003d cgit_repobasename(repo-\u003eurl);\n \tif (starts_with(snapshot.buf, reponame)) {\n \t\tconst char *new_start \u003d snapshot.buf;\n \t\tnew_start +\u003d strlen(reponame);\n@@ -200,7 +201,7 @@ void cgit_print_snapshot(const char *head, const char *hex,\n \t}\n \n \tif (!hex \u0026\u0026 dwim) {\n-\t\thex \u003d get_ref_from_filename(ctx.repo-\u003eurl, filename, f);\n+\t\thex \u003d get_ref_from_filename(ctx.repo, filename, f);\n \t\tif (hex \u003d\u003d NULL) {\n \t\t\tcgit_print_error_page(404, \u0022Not found\u0022, \u0022Not found\u0022);\n \t\t\treturn;\n","s":{"c":1745906350,"u": 928}}
],"g": 1778,"chitpc": 0,"ehitpc": 0,"indexed":0
,
"ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "0000"}