{"schema":"libjg2-1",
"vpath":"/git/",
"avatar":"/git/avatar/",
"alang":"",
"gen_ut":1745907593,
"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":"ed401d4f09e224f122aa84d70ac19f3d",
"commit": {"type":"commit",
"time": 1530115879,
"time_ofs": 120,
"oid_tree": { "oid": "98bc7c2e0c21f8a3f9229043ffa3888f6144467c", "alias": []},
"oid":{ "oid": "5b1f42ffeec7e315fc4fcff5145e5b0adca30715", "alias": []},
"msg": "ui-shared: use the same snapshot logic as ui-refs",
"sig_commit": { "git_time": { "time": 1530115879, "offset": 120 }, "name": "Jason A. Donenfeld", "email": "Jason@zx2c4.com", "md5": "689e78dac56e3d77d7f74984912487d3" },
"sig_author": { "git_time": { "time": 1522505161, "offset": 60 }, "name": "John Keeping", "email": "john@keeping.me.uk", "md5": "aea7d8738c91da1cb0dfa9d86f2bbc47" }},
"body": "ui-shared: use the same snapshot logic as ui-refs\n\nMake snapshot links in the commit UI use the same prefix algorithm as\nthose in the summary UI, so that refs starting with the snapshot prefix\nare used as-is rather than composed with the prefix repeated.\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-shared.c b/ui-shared.c\nindex 8ae81d2..50a168d 100644\n--- a/ui-shared.c\n+++ b/ui-shared.c\n@@ -1115,9 +1115,15 @@ void cgit_print_snapshot_links(const struct cgit_repo *repo, const char *ref)\n {\n \tconst struct cgit_snapshot_format* f;\n \tstruct strbuf filename \u003d STRBUF_INIT;\n+\tconst char *basename;\n \tsize_t prefixlen;\n \n-\tcgit_compose_snapshot_prefix(\u0026filename, cgit_snapshot_prefix(repo), ref);\n+\tbasename \u003d cgit_snapshot_prefix(repo);\n+\tif (starts_with(ref, basename))\n+\t\tstrbuf_addstr(\u0026filename, ref);\n+\telse\n+\t\tcgit_compose_snapshot_prefix(\u0026filename, basename, ref);\n+\n \tprefixlen \u003d filename.len;\n \tfor (f \u003d cgit_snapshot_formats; f-\u003esuffix; f++) {\n \t\tif (!(repo-\u003esnapshots \u0026 f-\u003ebit))\n","s":{"c":1745907593,"u": 1720}}
],"g": 3105,"chitpc": 0,"ehitpc": 0,"indexed":0
,
"ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "0000"}