{"schema":"libjg2-1",
"vpath":"/git/",
"avatar":"/git/avatar/",
"alang":"",
"gen_ut":1745906513,
"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":"a67d5a2b28c27a79281f0757f40612e2",
"commit": {"type":"commit",
"time": 1530115983,
"time_ofs": 120,
"oid_tree": { "oid": "7938fdb3af17e39507d282595e1591b0984cc2ec", "alias": []},
"oid":{ "oid": "255b78ff5291cef79978b025c9872f801de89e23", "alias": []},
"msg": "git: update to v2.18.0",
"sig_commit": { "git_time": { "time": 1530115983, "offset": 120 }, "name": "Jason A. Donenfeld", "email": "Jason@zx2c4.com", "md5": "689e78dac56e3d77d7f74984912487d3" },
"sig_author": { "git_time": { "time": 1528130968, "offset": 120 }, "name": "Christian Hesse", "email": "mail@eworm.de", "md5": "d39edb2018ca5544c1c390a8266096fb" }},
"body": "git: update to v2.18.0\n\nUpdate to git version v2.18.0. Required changes follow upstream commits:\n\n* Convert find_unique_abbrev* to struct object_id\n (aab9583f7b5ea5463eb3f653a0b4ecac7539dc94)\n* sha1_file: convert read_sha1_file to struct object_id\n (b4f5aca40e6f77cbabcbf4ff003c3cf30a1830c8)\n* sha1_file: convert sha1_object_info* to object_id\n (abef9020e3df87c441c9a3a95f592fce5fa49bb9)\n* object-store: move packed_git and packed_git_mru to object store\n (a80d72db2a73174b3f22142eb2014b33696fd795)\n* treewide: rename tree to maybe_tree\n (891435d55da80ca3654b19834481205be6bdfe33)\n\nThe changed data types required some of our own functions to be converted\nto struct object_id:\n\n ls_item\n print_dir\n print_dir_entry\n print_object\n single_tree_cb\n walk_tree\n write_tree_link\n\nAnd finally we use new upstream functions that were added for\nstruct object_id:\n\n hashcpy -\u003e oidcpy\n sha1_to_hex -\u003e oid_to_hex\n\nSigned-off-by: Christian Hesse \u003cmail@eworm.de\u003e\nReviewed-by: John Keeping \u003cjohn@keeping.me.uk\u003e\n"
,
"diff": "diff --git a/Makefile b/Makefile\nindex be2ed4f..137150c 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -14,7 +14,7 @@ htmldir \u003d $(docdir)\n pdfdir \u003d $(docdir)\n mandir \u003d $(prefix)/share/man\n SHA1_HEADER \u003d \u003copenssl/sha.h\u003e\n-GIT_VER \u003d 2.17.1\n+GIT_VER \u003d 2.18.0\n GIT_URL \u003d https://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.gz\n INSTALL \u003d install\n COPYTREE \u003d cp -r\ndiff --git a/git b/git\nindex fc54c1a..53f9a3e 160000\n--- a/git\n+++ b/git\n@@ -1 +1 @@\n-Subproject commit fc54c1af3ec09bab8b8ea09768c2da4069b7f53e\n+Subproject commit 53f9a3e157dbbc901a02ac2c73346d375e24978c\ndiff --git a/parsing.c b/parsing.c\nindex fd1ea99..12453c2 100644\n--- a/parsing.c\n+++ b/parsing.c\n@@ -200,7 +200,7 @@ struct taginfo *cgit_parse_tag(struct tag *tag)\n \tconst char *p;\n \tstruct taginfo *ret \u003d NULL;\n \n-\tdata \u003d read_sha1_file(tag-\u003eobject.oid.hash, \u0026type, \u0026size);\n+\tdata \u003d read_object_file(\u0026tag-\u003eobject.oid, \u0026type, \u0026size);\n \tif (!data || type !\u003d OBJ_TAG)\n \t\tgoto cleanup;\n \ndiff --git a/shared.c b/shared.c\nindex d59ae7e..d7c7636 100644\n--- a/shared.c\n+++ b/shared.c\n@@ -239,7 +239,7 @@ static int load_mmfile(mmfile_t *file, const struct object_id *oid)\n \t\tfile-\u003eptr \u003d (char *)\u0022\u0022;\n \t\tfile-\u003esize \u003d 0;\n \t} else {\n-\t\tfile-\u003eptr \u003d read_sha1_file(oid-\u003ehash, \u0026type,\n+\t\tfile-\u003eptr \u003d read_object_file(oid, \u0026type,\n \t\t (unsigned long *)\u0026file-\u003esize);\n \t}\n \treturn 1;\ndiff --git a/ui-blame.c b/ui-blame.c\nindex b118a81..50d0580 100644\n--- a/ui-blame.c\n+++ b/ui-blame.c\n@@ -49,7 +49,7 @@ static void emit_blame_entry_hash(struct blame_entry *ent)\n \n \tchar *detail \u003d emit_suspect_detail(suspect);\n \thtml(\u0022\u003cspan class\u003d'sha1'\u003e\u0022);\n-\tcgit_commit_link(find_unique_abbrev(oid-\u003ehash, DEFAULT_ABBREV), detail,\n+\tcgit_commit_link(find_unique_abbrev(oid, DEFAULT_ABBREV), detail,\n \t\t\t NULL, ctx.qry.head, oid_to_hex(oid), suspect-\u003epath);\n \thtml(\u0022\u003c/span\u003e\u0022);\n \tfree(detail);\n@@ -98,7 +98,7 @@ struct walk_tree_context {\n \tint state;\n };\n \n-static void print_object(const unsigned char *sha1, const char *path,\n+static void print_object(const struct object_id *oid, const char *path,\n \t\t\t const char *basename, const char *rev)\n {\n \tenum object_type type;\n@@ -110,17 +110,17 @@ static void print_object(const unsigned char *sha1, const char *path,\n \tstruct blame_origin *o;\n \tstruct blame_entry *ent \u003d NULL;\n \n-\ttype \u003d sha1_object_info(sha1, \u0026size);\n+\ttype \u003d oid_object_info(the_repository, oid, \u0026size);\n \tif (type \u003d\u003d OBJ_BAD) {\n \t\tcgit_print_error_page(404, \u0022Not found\u0022, \u0022Bad object name: %s\u0022,\n-\t\t\t\t sha1_to_hex(sha1));\n+\t\t\t\t oid_to_hex(oid));\n \t\treturn;\n \t}\n \n-\tbuf \u003d read_sha1_file(sha1, \u0026type, \u0026size);\n+\tbuf \u003d read_object_file(oid, \u0026type, \u0026size);\n \tif (!buf) {\n \t\tcgit_print_error_page(500, \u0022Internal server error\u0022,\n-\t\t\t\u0022Error reading object %s\u0022, sha1_to_hex(sha1));\n+\t\t\t\u0022Error reading object %s\u0022, oid_to_hex(oid));\n \t\treturn;\n \t}\n \n@@ -144,7 +144,7 @@ static void print_object(const unsigned char *sha1, const char *path,\n \tcgit_set_title_from_path(path);\n \n \tcgit_print_layout_start();\n-\thtmlf(\u0022blob: %s (\u0022, sha1_to_hex(sha1));\n+\thtmlf(\u0022blob: %s (\u0022, oid_to_hex(oid));\n \tcgit_plain_link(\u0022plain\u0022, NULL, NULL, ctx.qry.head, rev, path);\n \thtml(\u0022) (\u0022);\n \tcgit_tree_link(\u0022tree\u0022, NULL, NULL, ctx.qry.head, rev, path);\n@@ -218,7 +218,7 @@ cleanup:\n \tfree(buf);\n }\n \n-static int walk_tree(const unsigned char *sha1, struct strbuf *base,\n+static int walk_tree(const struct object_id *oid, struct strbuf *base,\n \t\t const char *pathname, unsigned mode, int stage,\n \t\t void *cbdata)\n {\n@@ -229,7 +229,7 @@ static int walk_tree(const unsigned char *sha1, struct strbuf *base,\n \t\t\tstruct strbuf buffer \u003d STRBUF_INIT;\n \t\t\tstrbuf_addbuf(\u0026buffer, base);\n \t\t\tstrbuf_addstr(\u0026buffer, pathname);\n-\t\t\tprint_object(sha1, buffer.buf, pathname,\n+\t\t\tprint_object(oid, buffer.buf, pathname,\n \t\t\t\t walk_tree_ctx-\u003ecurr_rev);\n \t\t\tstrbuf_release(\u0026buffer);\n \t\t\twalk_tree_ctx-\u003estate \u003d 1;\n@@ -289,7 +289,7 @@ void cgit_print_blame(void)\n \twalk_tree_ctx.match_baselen \u003d (path_items.match) ?\n \t\t\t\t basedir_len(path_items.match) : -1;\n \n-\tread_tree_recursive(commit-\u003etree, \u0022\u0022, 0, 0, \u0026paths, walk_tree,\n+\tread_tree_recursive(commit-\u003emaybe_tree, \u0022\u0022, 0, 0, \u0026paths, walk_tree,\n \t\t\u0026walk_tree_ctx);\n \tif (!walk_tree_ctx.state)\n \t\tcgit_print_error_page(404, \u0022Not found\u0022, \u0022Not found\u0022);\ndiff --git a/ui-blob.c b/ui-blob.c\nindex 761e886..7b6da2a 100644\n--- a/ui-blob.c\n+++ b/ui-blob.c\n@@ -18,7 +18,7 @@ struct walk_tree_context {\n \tunsigned int file_only:1;\n };\n \n-static int walk_tree(const unsigned char *sha1, struct strbuf *base,\n+static int walk_tree(const struct object_id *oid, struct strbuf *base,\n \t\tconst char *pathname, unsigned mode, int stage, void *cbdata)\n {\n \tstruct walk_tree_context *walk_tree_ctx \u003d cbdata;\n@@ -28,7 +28,7 @@ static int walk_tree(const unsigned char *sha1, struct strbuf *base,\n \tif (strncmp(base-\u003ebuf, walk_tree_ctx-\u003ematch_path, base-\u003elen)\n \t\t|| strcmp(walk_tree_ctx-\u003ematch_path + base-\u003elen, pathname))\n \t\treturn READ_TREE_RECURSIVE;\n-\thashcpy(walk_tree_ctx-\u003ematched_oid-\u003ehash, sha1);\n+\toidcpy(walk_tree_ctx-\u003ematched_oid, oid);\n \twalk_tree_ctx-\u003efound_path \u003d 1;\n \treturn 0;\n }\n@@ -54,9 +54,9 @@ int cgit_ref_path_exists(const char *path, const char *ref, int file_only)\n \n \tif (get_oid(ref, \u0026oid))\n \t\tgoto done;\n-\tif (sha1_object_info(oid.hash, \u0026size) !\u003d OBJ_COMMIT)\n+\tif (oid_object_info(the_repository, \u0026oid, \u0026size) !\u003d OBJ_COMMIT)\n \t\tgoto done;\n-\tread_tree_recursive(lookup_commit_reference(\u0026oid)-\u003etree, \u0022\u0022, 0, 0, \u0026paths, walk_tree, \u0026walk_tree_ctx);\n+\tread_tree_recursive(lookup_commit_reference(\u0026oid)-\u003emaybe_tree, \u0022\u0022, 0, 0, \u0026paths, walk_tree, \u0026walk_tree_ctx);\n \n done:\n \tfree(path_items.match);\n@@ -87,17 +87,17 @@ int cgit_print_file(char *path, const char *head, int file_only)\n \n \tif (get_oid(head, \u0026oid))\n \t\treturn -1;\n-\ttype \u003d sha1_object_info(oid.hash, \u0026size);\n+\ttype \u003d oid_object_info(the_repository, \u0026oid, \u0026size);\n \tif (type \u003d\u003d OBJ_COMMIT) {\n \t\tcommit \u003d lookup_commit_reference(\u0026oid);\n-\t\tread_tree_recursive(commit-\u003etree, \u0022\u0022, 0, 0, \u0026paths, walk_tree, \u0026walk_tree_ctx);\n+\t\tread_tree_recursive(commit-\u003emaybe_tree, \u0022\u0022, 0, 0, \u0026paths, walk_tree, \u0026walk_tree_ctx);\n \t\tif (!walk_tree_ctx.found_path)\n \t\t\treturn -1;\n-\t\ttype \u003d sha1_object_info(oid.hash, \u0026size);\n+\t\ttype \u003d oid_object_info(the_repository, \u0026oid, \u0026size);\n \t}\n \tif (type \u003d\u003d OBJ_BAD)\n \t\treturn -1;\n-\tbuf \u003d read_sha1_file(oid.hash, \u0026type, \u0026size);\n+\tbuf \u003d read_object_file(\u0026oid, \u0026type, \u0026size);\n \tif (!buf)\n \t\treturn -1;\n \tbuf[size] \u003d '\u005c0';\n@@ -142,12 +142,12 @@ void cgit_print_blob(const char *hex, char *path, const char *head, int file_onl\n \t\t}\n \t}\n \n-\ttype \u003d sha1_object_info(oid.hash, \u0026size);\n+\ttype \u003d oid_object_info(the_repository, \u0026oid, \u0026size);\n \n \tif ((!hex) \u0026\u0026 type \u003d\u003d OBJ_COMMIT \u0026\u0026 path) {\n \t\tcommit \u003d lookup_commit_reference(\u0026oid);\n-\t\tread_tree_recursive(commit-\u003etree, \u0022\u0022, 0, 0, \u0026paths, walk_tree, \u0026walk_tree_ctx);\n-\t\ttype \u003d sha1_object_info(oid.hash, \u0026size);\n+\t\tread_tree_recursive(commit-\u003emaybe_tree, \u0022\u0022, 0, 0, \u0026paths, walk_tree, \u0026walk_tree_ctx);\n+\t\ttype \u003d oid_object_info(the_repository, \u0026oid, \u0026size);\n \t}\n \n \tif (type \u003d\u003d OBJ_BAD) {\n@@ -156,7 +156,7 @@ void cgit_print_blob(const char *hex, char *path, const char *head, int file_onl\n \t\treturn;\n \t}\n \n-\tbuf \u003d read_sha1_file(oid.hash, \u0026type, \u0026size);\n+\tbuf \u003d read_object_file(\u0026oid, \u0026type, \u0026size);\n \tif (!buf) {\n \t\tcgit_print_error_page(500, \u0022Internal server error\u0022,\n \t\t\t\t\u0022Error reading object %s\u0022, hex);\ndiff --git a/ui-clone.c b/ui-clone.c\nindex bc98980..2c1ac3d 100644\n--- a/ui-clone.c\n+++ b/ui-clone.c\n@@ -12,6 +12,7 @@\n #include \u0022html.h\u0022\n #include \u0022ui-shared.h\u0022\n #include \u0022packfile.h\u0022\n+#include \u0022object-store.h\u0022\n \n static int print_ref_info(const char *refname, const struct object_id *oid,\n int flags, void *cb_data)\n@@ -38,8 +39,8 @@ static void print_pack_info(void)\n \tctx.page.mimetype \u003d \u0022text/plain\u0022;\n \tctx.page.filename \u003d \u0022objects/info/packs\u0022;\n \tcgit_print_http_headers();\n-\tprepare_packed_git();\n-\tfor (pack \u003d packed_git; pack; pack \u003d pack-\u003enext) {\n+\treprepare_packed_git(the_repository);\n+\tfor (pack \u003d get_packed_git(the_repository); pack; pack \u003d pack-\u003enext) {\n \t\tif (pack-\u003epack_local) {\n \t\t\toffset \u003d strrchr(pack-\u003epack_name, '/');\n \t\t\tif (offset \u0026\u0026 offset[1] !\u003d '\u005c0')\ndiff --git a/ui-commit.c b/ui-commit.c\nindex 65b4603..995cb93 100644\n--- a/ui-commit.c\n+++ b/ui-commit.c\n@@ -78,7 +78,7 @@ void cgit_print_commit(char *hex, const char *prefix)\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(oid_to_hex(\u0026commit-\u003etree-\u003eobject.oid), NULL, NULL,\n+\tcgit_tree_link(oid_to_hex(\u0026commit-\u003emaybe_tree-\u003eobject.oid), NULL, NULL,\n \t\t ctx.qry.head, tmp, NULL);\n \tif (prefix) {\n \t\thtml(\u0022 /\u0022);\ndiff --git a/ui-diff.c b/ui-diff.c\nindex a10ce8a..e33e9fb 100644\n--- a/ui-diff.c\n+++ b/ui-diff.c\n@@ -258,8 +258,8 @@ static void header(const struct object_id *oid1, char *path1, int mode1,\n \t\thtmlf(\u0022\u003cbr/\u003edeleted file mode %.6o\u0022, mode1);\n \n \tif (!subproject) {\n-\t\tabbrev1 \u003d xstrdup(find_unique_abbrev(oid1-\u003ehash, DEFAULT_ABBREV));\n-\t\tabbrev2 \u003d xstrdup(find_unique_abbrev(oid2-\u003ehash, DEFAULT_ABBREV));\n+\t\tabbrev1 \u003d xstrdup(find_unique_abbrev(oid1, DEFAULT_ABBREV));\n+\t\tabbrev2 \u003d xstrdup(find_unique_abbrev(oid2, DEFAULT_ABBREV));\n \t\thtmlf(\u0022\u003cbr/\u003eindex %s..%s\u0022, abbrev1, abbrev2);\n \t\tfree(abbrev1);\n \t\tfree(abbrev2);\n@@ -413,7 +413,7 @@ void cgit_print_diff(const char *new_rev, const char *old_rev,\n \t\t\t\u0022Bad commit: %s\u0022, oid_to_hex(new_rev_oid));\n \t\treturn;\n \t}\n-\tnew_tree_oid \u003d \u0026commit-\u003etree-\u003eobject.oid;\n+\tnew_tree_oid \u003d \u0026commit-\u003emaybe_tree-\u003eobject.oid;\n \n \tif (old_rev) {\n \t\tif (get_oid(old_rev, old_rev_oid)) {\n@@ -434,7 +434,7 @@ void cgit_print_diff(const char *new_rev, const char *old_rev,\n \t\t\t\t\u0022Bad commit: %s\u0022, oid_to_hex(old_rev_oid));\n \t\t\treturn;\n \t\t}\n-\t\told_tree_oid \u003d \u0026commit2-\u003etree-\u003eobject.oid;\n+\t\told_tree_oid \u003d \u0026commit2-\u003emaybe_tree-\u003eobject.oid;\n \t} else {\n \t\told_tree_oid \u003d NULL;\n \t}\ndiff --git a/ui-log.c b/ui-log.c\nindex b5cd2f6..d696e20 100644\n--- a/ui-log.c\n+++ b/ui-log.c\n@@ -153,8 +153,8 @@ static int show_commit(struct commit *commit, struct rev_info *revs)\n \trem_lines \u003d 0;\n \n \trevs-\u003ediffopt.flags.recursive \u003d 1;\n-\tdiff_tree_oid(\u0026parent-\u003etree-\u003eobject.oid,\n-\t\t \u0026commit-\u003etree-\u003eobject.oid,\n+\tdiff_tree_oid(\u0026parent-\u003emaybe_tree-\u003eobject.oid,\n+\t\t \u0026commit-\u003emaybe_tree-\u003eobject.oid,\n \t\t \u0022\u0022, \u0026revs-\u003ediffopt);\n \tdiffcore_std(\u0026revs-\u003ediffopt);\n \ndiff --git a/ui-plain.c b/ui-plain.c\nindex cfdbf73..ddb3e48 100644\n--- a/ui-plain.c\n+++ b/ui-plain.c\n@@ -16,19 +16,19 @@ struct walk_tree_context {\n \tint match;\n };\n \n-static int print_object(const unsigned char *sha1, const char *path)\n+static int print_object(const struct object_id *oid, const char *path)\n {\n \tenum object_type type;\n \tchar *buf, *mimetype;\n \tunsigned long size;\n \n-\ttype \u003d sha1_object_info(sha1, \u0026size);\n+\ttype \u003d oid_object_info(the_repository, oid, \u0026size);\n \tif (type \u003d\u003d OBJ_BAD) {\n \t\tcgit_print_error_page(404, \u0022Not found\u0022, \u0022Not found\u0022);\n \t\treturn 0;\n \t}\n \n-\tbuf \u003d read_sha1_file(sha1, \u0026type, \u0026size);\n+\tbuf \u003d read_object_file(oid, \u0026type, \u0026size);\n \tif (!buf) {\n \t\tcgit_print_error_page(404, \u0022Not found\u0022, \u0022Not found\u0022);\n \t\treturn 0;\n@@ -57,7 +57,7 @@ static int print_object(const unsigned char *sha1, const char *path)\n \t}\n \tctx.page.filename \u003d path;\n \tctx.page.size \u003d size;\n-\tctx.page.etag \u003d sha1_to_hex(sha1);\n+\tctx.page.etag \u003d oid_to_hex(oid);\n \tcgit_print_http_headers();\n \thtml_raw(buf, size);\n \tfree(mimetype);\n@@ -73,7 +73,7 @@ static char *buildpath(const char *base, int baselen, const char *path)\n \t\treturn fmtalloc(\u0022%.*s/\u0022, baselen, base);\n }\n \n-static void print_dir(const unsigned char *sha1, const char *base,\n+static void print_dir(const struct object_id *oid, const char *base,\n \t\t int baselen, const char *path)\n {\n \tchar *fullpath, *slash;\n@@ -81,7 +81,7 @@ static void print_dir(const unsigned char *sha1, const char *base,\n \n \tfullpath \u003d buildpath(base, baselen, path);\n \tslash \u003d (fullpath[0] \u003d\u003d '/' ? \u0022\u0022 : \u0022/\u0022);\n-\tctx.page.etag \u003d sha1_to_hex(sha1);\n+\tctx.page.etag \u003d oid_to_hex(oid);\n \tcgit_print_http_headers();\n \thtmlf(\u0022\u003chtml\u003e\u003chead\u003e\u003ctitle\u003e%s\u0022, slash);\n \thtml_txt(fullpath);\n@@ -106,7 +106,7 @@ static void print_dir(const unsigned char *sha1, const char *base,\n \tfree(fullpath);\n }\n \n-static void print_dir_entry(const unsigned char *sha1, const char *base,\n+static void print_dir_entry(const struct object_id *oid, const char *base,\n \t\t\t int baselen, const char *path, unsigned mode)\n {\n \tchar *fullpath;\n@@ -116,7 +116,7 @@ static void print_dir_entry(const unsigned char *sha1, const char *base,\n \t\tfullpath[strlen(fullpath) - 1] \u003d 0;\n \thtml(\u0022 \u003cli\u003e\u0022);\n \tif (S_ISGITLINK(mode)) {\n-\t\tcgit_submodule_link(NULL, fullpath, sha1_to_hex(sha1));\n+\t\tcgit_submodule_link(NULL, fullpath, oid_to_hex(oid));\n \t} else\n \t\tcgit_plain_link(path, NULL, NULL, ctx.qry.head, ctx.qry.sha1,\n \t\t\t\tfullpath);\n@@ -129,22 +129,22 @@ static void print_dir_tail(void)\n \thtml(\u0022 \u003c/ul\u003e\u005cn\u003c/body\u003e\u003c/html\u003e\u005cn\u0022);\n }\n \n-static int walk_tree(const unsigned char *sha1, struct strbuf *base,\n+static int walk_tree(const struct object_id *oid, struct strbuf *base,\n \t\tconst char *pathname, unsigned mode, int stage, void *cbdata)\n {\n \tstruct walk_tree_context *walk_tree_ctx \u003d cbdata;\n \n \tif (base-\u003elen \u003d\u003d walk_tree_ctx-\u003ematch_baselen) {\n \t\tif (S_ISREG(mode) || S_ISLNK(mode)) {\n-\t\t\tif (print_object(sha1, pathname))\n+\t\t\tif (print_object(oid, pathname))\n \t\t\t\twalk_tree_ctx-\u003ematch \u003d 1;\n \t\t} else if (S_ISDIR(mode)) {\n-\t\t\tprint_dir(sha1, base-\u003ebuf, base-\u003elen, pathname);\n+\t\t\tprint_dir(oid, base-\u003ebuf, base-\u003elen, pathname);\n \t\t\twalk_tree_ctx-\u003ematch \u003d 2;\n \t\t\treturn READ_TREE_RECURSIVE;\n \t\t}\n \t} else if (base-\u003elen \u003c INT_MAX \u0026\u0026 (int)base-\u003elen \u003e walk_tree_ctx-\u003ematch_baselen) {\n-\t\tprint_dir_entry(sha1, base-\u003ebuf, base-\u003elen, pathname, mode);\n+\t\tprint_dir_entry(oid, base-\u003ebuf, base-\u003elen, pathname, mode);\n \t\twalk_tree_ctx-\u003ematch \u003d 2;\n \t} else if (S_ISDIR(mode)) {\n \t\treturn READ_TREE_RECURSIVE;\n@@ -193,12 +193,12 @@ void cgit_print_plain(void)\n \tif (!path_items.match) {\n \t\tpath_items.match \u003d \u0022\u0022;\n \t\twalk_tree_ctx.match_baselen \u003d -1;\n-\t\tprint_dir(commit-\u003etree-\u003eobject.oid.hash, \u0022\u0022, 0, \u0022\u0022);\n+\t\tprint_dir(\u0026commit-\u003emaybe_tree-\u003eobject.oid, \u0022\u0022, 0, \u0022\u0022);\n \t\twalk_tree_ctx.match \u003d 2;\n \t}\n \telse\n \t\twalk_tree_ctx.match_baselen \u003d basedir_len(path_items.match);\n-\tread_tree_recursive(commit-\u003etree, \u0022\u0022, 0, 0, \u0026paths, walk_tree, \u0026walk_tree_ctx);\n+\tread_tree_recursive(commit-\u003emaybe_tree, \u0022\u0022, 0, 0, \u0026paths, walk_tree, \u0026walk_tree_ctx);\n \tif (!walk_tree_ctx.match)\n \t\tcgit_print_error_page(404, \u0022Not found\u0022, \u0022Not found\u0022);\n \telse if (walk_tree_ctx.match \u003d\u003d 2)\ndiff --git a/ui-snapshot.c b/ui-snapshot.c\nindex 83ce6e8..92c3277 100644\n--- a/ui-snapshot.c\n+++ b/ui-snapshot.c\n@@ -174,7 +174,7 @@ static int write_sig(const struct cgit_snapshot_format *format,\n \t\treturn 0;\n \t}\n \n-\tbuf \u003d read_sha1_file(note-\u003ehash, \u0026type, \u0026size);\n+\tbuf \u003d read_object_file(note, \u0026type, \u0026size);\n \tif (!buf) {\n \t\tcgit_print_error_page(404, \u0022Not found\u0022, \u0022Not found\u0022);\n \t\treturn 0;\ndiff --git a/ui-tree.c b/ui-tree.c\nindex 524de0f..e6b3074 100644\n--- a/ui-tree.c\n+++ b/ui-tree.c\n@@ -84,30 +84,30 @@ static void print_binary_buffer(char *buf, unsigned long size)\n \thtml(\u0022\u003c/table\u003e\u005cn\u0022);\n }\n \n-static void print_object(const unsigned char *sha1, char *path, const char *basename, const char *rev)\n+static void print_object(const struct object_id *oid, char *path, const char *basename, const char *rev)\n {\n \tenum object_type type;\n \tchar *buf;\n \tunsigned long size;\n \n-\ttype \u003d sha1_object_info(sha1, \u0026size);\n+\ttype \u003d oid_object_info(the_repository, oid, \u0026size);\n \tif (type \u003d\u003d OBJ_BAD) {\n \t\tcgit_print_error_page(404, \u0022Not found\u0022,\n-\t\t\t\u0022Bad object name: %s\u0022, sha1_to_hex(sha1));\n+\t\t\t\u0022Bad object name: %s\u0022, oid_to_hex(oid));\n \t\treturn;\n \t}\n \n-\tbuf \u003d read_sha1_file(sha1, \u0026type, \u0026size);\n+\tbuf \u003d read_object_file(oid, \u0026type, \u0026size);\n \tif (!buf) {\n \t\tcgit_print_error_page(500, \u0022Internal server error\u0022,\n-\t\t\t\u0022Error reading object %s\u0022, sha1_to_hex(sha1));\n+\t\t\t\u0022Error reading object %s\u0022, oid_to_hex(oid));\n \t\treturn;\n \t}\n \n \tcgit_set_title_from_path(path);\n \n \tcgit_print_layout_start();\n-\thtmlf(\u0022blob: %s (\u0022, sha1_to_hex(sha1));\n+\thtmlf(\u0022blob: %s (\u0022, oid_to_hex(oid));\n \tcgit_plain_link(\u0022plain\u0022, NULL, NULL, ctx.qry.head,\n \t\t rev, path);\n \tif (ctx.cfg.enable_blame) {\n@@ -138,7 +138,7 @@ struct single_tree_ctx {\n \tsize_t count;\n };\n \n-static int single_tree_cb(const unsigned char *sha1, struct strbuf *base,\n+static int single_tree_cb(const struct object_id *oid, struct strbuf *base,\n \t\t\t const char *pathname, unsigned mode, int stage,\n \t\t\t void *cbdata)\n {\n@@ -153,12 +153,12 @@ static int single_tree_cb(const unsigned char *sha1, struct strbuf *base,\n \t}\n \n \tctx-\u003ename \u003d xstrdup(pathname);\n-\thashcpy(ctx-\u003eoid.hash, sha1);\n+\toidcpy(\u0026ctx-\u003eoid, oid);\n \tstrbuf_addf(ctx-\u003epath, \u0022/%s\u0022, pathname);\n \treturn 0;\n }\n \n-static void write_tree_link(const unsigned char *sha1, char *name,\n+static void write_tree_link(const struct object_id *oid, char *name,\n \t\t\t char *rev, struct strbuf *fullpath)\n {\n \tsize_t initial_length \u003d fullpath-\u003elen;\n@@ -171,7 +171,7 @@ static void write_tree_link(const unsigned char *sha1, char *name,\n \t\t.nr \u003d 0\n \t};\n \n-\thashcpy(tree_ctx.oid.hash, sha1);\n+\toidcpy(\u0026tree_ctx.oid, oid);\n \n \twhile (tree_ctx.count \u003d\u003d 1) {\n \t\tcgit_tree_link(name, NULL, \u0022ls-dir\u0022, ctx.qry.head, rev,\n@@ -198,7 +198,7 @@ static void write_tree_link(const unsigned char *sha1, char *name,\n \tstrbuf_setlen(fullpath, initial_length);\n }\n \n-static int ls_item(const unsigned char *sha1, struct strbuf *base,\n+static int ls_item(const struct object_id *oid, struct strbuf *base,\n \t\tconst char *pathname, unsigned mode, int stage, void *cbdata)\n {\n \tstruct walk_tree_context *walk_tree_ctx \u003d cbdata;\n@@ -213,11 +213,11 @@ static int ls_item(const unsigned char *sha1, struct strbuf *base,\n \t\t ctx.qry.path ? \u0022/\u0022 : \u0022\u0022, name);\n \n \tif (!S_ISGITLINK(mode)) {\n-\t\ttype \u003d sha1_object_info(sha1, \u0026size);\n+\t\ttype \u003d oid_object_info(the_repository, oid, \u0026size);\n \t\tif (type \u003d\u003d OBJ_BAD) {\n \t\t\thtmlf(\u0022\u003ctr\u003e\u003ctd colspan\u003d'3'\u003eBad object: %s %s\u003c/td\u003e\u003c/tr\u003e\u0022,\n \t\t\t name,\n-\t\t\t sha1_to_hex(sha1));\n+\t\t\t oid_to_hex(oid));\n \t\t\tfree(name);\n \t\t\treturn 0;\n \t\t}\n@@ -227,9 +227,9 @@ static int ls_item(const unsigned char *sha1, struct strbuf *base,\n \tcgit_print_filemode(mode);\n \thtml(\u0022\u003c/td\u003e\u003ctd\u003e\u0022);\n \tif (S_ISGITLINK(mode)) {\n-\t\tcgit_submodule_link(\u0022ls-mod\u0022, fullpath.buf, sha1_to_hex(sha1));\n+\t\tcgit_submodule_link(\u0022ls-mod\u0022, fullpath.buf, oid_to_hex(oid));\n \t} else if (S_ISDIR(mode)) {\n-\t\twrite_tree_link(sha1, name, walk_tree_ctx-\u003ecurr_rev,\n+\t\twrite_tree_link(oid, name, walk_tree_ctx-\u003ecurr_rev,\n \t\t\t\t\u0026fullpath);\n \t} else {\n \t\tchar *ext \u003d strrchr(name, '.');\n@@ -289,7 +289,7 @@ static void ls_tree(const struct object_id *oid, char *path, struct walk_tree_co\n \ttree \u003d parse_tree_indirect(oid);\n \tif (!tree) {\n \t\tcgit_print_error_page(404, \u0022Not found\u0022,\n-\t\t\t\u0022Not a tree object: %s\u0022, sha1_to_hex(oid-\u003ehash));\n+\t\t\t\u0022Not a tree object: %s\u0022, oid_to_hex(oid));\n \t\treturn;\n \t}\n \n@@ -299,7 +299,7 @@ static void ls_tree(const struct object_id *oid, char *path, struct walk_tree_co\n }\n \n \n-static int walk_tree(const unsigned char *sha1, struct strbuf *base,\n+static int walk_tree(const struct object_id *oid, struct strbuf *base,\n \t\tconst char *pathname, unsigned mode, int stage, void *cbdata)\n {\n \tstruct walk_tree_context *walk_tree_ctx \u003d cbdata;\n@@ -320,12 +320,12 @@ static int walk_tree(const unsigned char *sha1, struct strbuf *base,\n \t\t\treturn READ_TREE_RECURSIVE;\n \t\t} else {\n \t\t\twalk_tree_ctx-\u003estate \u003d 2;\n-\t\t\tprint_object(sha1, buffer.buf, pathname, walk_tree_ctx-\u003ecurr_rev);\n+\t\t\tprint_object(oid, buffer.buf, pathname, walk_tree_ctx-\u003ecurr_rev);\n \t\t\tstrbuf_release(\u0026buffer);\n \t\t\treturn 0;\n \t\t}\n \t}\n-\tls_item(sha1, base, pathname, mode, stage, walk_tree_ctx);\n+\tls_item(oid, base, pathname, mode, stage, walk_tree_ctx);\n \treturn 0;\n }\n \n@@ -369,11 +369,11 @@ void cgit_print_tree(const char *rev, char *path)\n \twalk_tree_ctx.curr_rev \u003d xstrdup(rev);\n \n \tif (path \u003d\u003d NULL) {\n-\t\tls_tree(\u0026commit-\u003etree-\u003eobject.oid, NULL, \u0026walk_tree_ctx);\n+\t\tls_tree(\u0026commit-\u003emaybe_tree-\u003eobject.oid, NULL, \u0026walk_tree_ctx);\n \t\tgoto cleanup;\n \t}\n \n-\tread_tree_recursive(commit-\u003etree, \u0022\u0022, 0, 0, \u0026paths, walk_tree, \u0026walk_tree_ctx);\n+\tread_tree_recursive(commit-\u003emaybe_tree, \u0022\u0022, 0, 0, \u0026paths, walk_tree, \u0026walk_tree_ctx);\n \tif (walk_tree_ctx.state \u003d\u003d 1)\n \t\tls_tail();\n \telse if (walk_tree_ctx.state \u003d\u003d 2)\n","s":{"c":1745906513,"u": 7132}}
],"g": 9865,"chitpc": 0,"ehitpc": 0,"indexed":0
,
"ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "0000"}