diff options
| -rw-r--r-- | Makefile | 4 | ||||
| -rw-r--r-- | cgit.c | 7 | ||||
| -rw-r--r-- | cgit.h | 3 | ||||
| m--------- | git | 0 | ||||
| -rw-r--r-- | shared.c | 5 | ||||
| -rw-r--r-- | ui-clone.c | 22 | ||||
| -rw-r--r-- | ui-log.c | 2 | ||||
| -rw-r--r-- | ui-shared.c | 5 | ||||
| -rw-r--r-- | ui-tag.c | 2 |
9 files changed, 23 insertions, 27 deletions
@@ -14,8 +14,8 @@ htmldir = $(docdir) pdfdir = $(docdir) mandir = $(prefix)/share/man SHA1_HEADER = <openssl/sha.h> -GIT_VER = 2.52.0 -GIT_URL = https://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.xz +GIT_VER = 2.53.0.rc0 +GIT_URL = https://www.kernel.org/pub/software/scm/git/testing/git-$(GIT_VER).tar.xz INSTALL = install COPYTREE = cp -r MAN5_TXT = $(wildcard *.5.txt) @@ -448,16 +448,15 @@ struct refmatch { int match; }; -static int find_current_ref(const char *refname, const char *referent UNUSED, - const struct object_id *oid, int flags, void *cb_data) +static int find_current_ref(const struct reference *ref, void *cb_data) { struct refmatch *info; info = (struct refmatch *)cb_data; - if (!strcmp(refname, info->req_ref)) + if (!strcmp(ref->name, info->req_ref)) info->match = 1; if (!info->first_ref) - info->first_ref = xstrdup(refname); + info->first_ref = xstrdup(ref->name); return info->match; } @@ -346,8 +346,7 @@ extern void strbuf_ensure_end(struct strbuf *sb, char c); extern void cgit_add_ref(struct reflist *list, struct refinfo *ref); extern void cgit_free_reflist_inner(struct reflist *list); -extern int cgit_refs_cb(const char *refname, const char *referent UNUSED, - const struct object_id *oid, int flags, void *cb_data); +extern int cgit_refs_cb(const struct reference *ref, void *cb_data); extern void cgit_free_commitinfo(struct commitinfo *info); extern void cgit_free_taginfo(struct taginfo *info); diff --git a/git b/git -Subproject 9a2fb147f2c61d0cab52c883e7e26f5b7948e3e +Subproject 7264e61d87e58b9d0f5e6424c47c11e9657dfb7 @@ -212,11 +212,10 @@ void cgit_free_reflist_inner(struct reflist *list) free(list->refs); } -int cgit_refs_cb(const char *refname, const char *referent UNUSED, - const struct object_id *oid, int flags, void *cb_data) +int cgit_refs_cb(const struct reference *ref, void *cb_data) { struct reflist *list = (struct reflist *)cb_data; - struct refinfo *info = cgit_mk_refinfo(refname, oid); + struct refinfo *info = cgit_mk_refinfo(ref->name, ref->oid); if (info) cgit_add_ref(list, info); @@ -15,39 +15,39 @@ #include "ui-shared.h" #include "packfile.h" -static int print_ref_info(const char *refname, const char *referent UNUSED, - const struct object_id *oid, int flags, void *cb_data) +static int print_ref_info(const struct reference *ref, void *cb_data) { struct object *obj; - if (!(obj = parse_object(the_repository, oid))) + if (!(obj = parse_object(the_repository, ref->oid))) return 0; - htmlf("%s\t%s\n", oid_to_hex(oid), refname); + htmlf("%s\t%s\n", oid_to_hex(ref->oid), ref->name); if (obj->type == OBJ_TAG) { - if (!(obj = deref_tag(the_repository, obj, refname, 0))) + if (!(obj = deref_tag(the_repository, obj, ref->name, 0))) return 0; - htmlf("%s\t%s^{}\n", oid_to_hex(&obj->oid), refname); + htmlf("%s\t%s^{}\n", oid_to_hex(&obj->oid), ref->name); } return 0; } static void print_pack_info(void) { - struct packed_git *pack; + struct packfile_list_entry *e; char *offset; ctx.page.mimetype = "text/plain"; ctx.page.filename = "objects/info/packs"; cgit_print_http_headers(); odb_reprepare(the_repository->objects); - for (pack = packfile_store_get_packs(the_repository->objects->packfiles); pack; pack = pack->next) { - if (pack->pack_local) { - offset = strrchr(pack->pack_name, '/'); + for (e = packfile_store_get_packs(the_repository->objects->packfiles); e; e = e->next) { + struct packed_git *p = e->pack; + if (p->pack_local) { + offset = strrchr(p->pack_name, '/'); if (offset && offset[1] != '\0') ++offset; else - offset = pack->pack_name; + offset = p->pack_name; htmlf("P %s\n", offset); } } @@ -83,7 +83,7 @@ void show_commit_decorations(struct commit *commit) break; case DECORATION_REF_TAG: if (!refs_read_ref(get_main_ref_store(the_repository), deco->name, &oid_tag) && - !peel_iterated_oid(the_repository, &oid_tag, &peeled)) + !peel_object(the_repository, &oid_tag, &peeled, PEEL_OBJECT_VERIFY_TAGGED_OBJECT_TYPE)) is_annotated = !oideq(&oid_tag, &peeled); cgit_tag_link(buf, NULL, is_annotated ? "tag-annotated-deco" : "tag-deco", buf); break; diff --git a/ui-shared.c b/ui-shared.c index 4250b89..838170a 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -936,10 +936,9 @@ void cgit_add_clone_urls(void (*fn)(const char *)) add_clone_urls(fn, ctx.cfg.clone_prefix, ctx.repo->url); } -static int print_branch_option(const char *refname, const char *referent UNUSED, - const struct object_id *oid, int flags, void *cb_data) +static int print_branch_option(const struct reference *ref, void *cb_data) { - char *name = (char *)refname; + char *name = (char *)ref->name; html_option(name, name, ctx.qry.head); return 0; } @@ -66,7 +66,7 @@ void cgit_print_tag(char *revname) struct taginfo *info; tag = lookup_tag(the_repository, &oid); - if (!tag || parse_tag(tag) || !(info = cgit_parse_tag(tag))) { + if (!tag || parse_tag(the_repository, tag) || !(info = cgit_parse_tag(tag))) { cgit_print_error_page(500, "Internal server error", "Bad tag object: %s", revname); goto cleanup; |
