From rob at robdavies.net Tue Jan 13 06:08:37 2026 From: rob at robdavies.net (Robert Davies) Date: Tue, 13 Jan 2026 06:08:37 +0000 Subject: can I build cgit statically In-Reply-To: References: Message-ID: <95e8a23b-6d72-4285-a365-c06e31644eaa@robdavies.net> Hi I haven't found a way to build cgit statically, though I have found a solution to the LD_LIBRARY_PATH problem. I have used patchelf to add the LD_LIBRARY_PATH as an RPATH patchelf --add-rpath Kind regards, Rob On 13/10/2025 10:20, rob at robdavies.net wrote: > Hi > > Is there a way to build cgit statically? > > I'm trying to build cgit with lua on a shared web hosting. I have built > lua libraries and need to static link these lua libraries, this is due > to having no way to add lua libraries to LD_LIBRARY_PATH to run cgit > > Kind regards, > Rob From rob at robdavies.net Tue Jan 13 06:11:05 2026 From: rob at robdavies.net (Robert Davies) Date: Tue, 13 Jan 2026 06:11:05 +0000 Subject: building cgit with lua Message-ID: <29e965cf-4b30-4686-a3fa-503741b6aa43@robdavies.net> Hi I have built lua from source (shared library) and am having trouble building cgit using the lua library I built. I have tried creating a .pc file to use pkg-config, can't get that to work either. Can someone help? Kind regards, Rob From rob at robdavies.net Thu Jan 15 02:41:03 2026 From: rob at robdavies.net (Robert Davies) Date: Thu, 15 Jan 2026 02:41:03 +0000 Subject: building cgit with lua In-Reply-To: <29e965cf-4b30-4686-a3fa-503741b6aa43@robdavies.net> References: <29e965cf-4b30-4686-a3fa-503741b6aa43@robdavies.net> Message-ID: Hi Fixed it. Turns out it was a problem with the instructions I got to build lua as a shared library. Kind regards, Rob On 13/01/2026 06:11, Robert Davies wrote: > Hi > > I have built lua from source (shared library) and am having trouble > building cgit using the lua library I built. > > I have tried creating a .pc file to use pkg-config, can't get that to > work either. > > Can someone help? > > Kind regards, > Rob From list at eworm.de Mon Jan 19 13:44:32 2026 From: list at eworm.de (Christian Hesse) Date: Mon, 19 Jan 2026 14:44:32 +0100 Subject: [PATCH 1/1] RFC: git: update to v2.53.0-rc0 Message-ID: <20260119134432.232210-1-list@eworm.de> From: Christian Hesse Update to git version v2.53.0-rc0, this requires changes for these upstream commits: * bdbebe5714b25dc9d215b48efbb80f410925d7dd refs: introduce wrapper struct for `each_ref_fn` * 589127caa73090040200989ff4d24c3d54f473f2 packfile: move list of packs into the packfile store * 5a5c7359f77ecd1bc4b0e172563161d602f131d3 refs: drop `current_ref_iter` hack * b6e4cc8c32850315323961659e553d1d14591f7f tag: support arbitrary repositories in parse_tag() Signed-off-by: Christian Hesse --- Makefile | 4 ++-- cgit.c | 7 +++---- cgit.h | 3 +-- git | 2 +- shared.c | 5 ++--- ui-clone.c | 22 +++++++++++----------- ui-log.c | 2 +- ui-shared.c | 5 ++--- ui-tag.c | 2 +- 9 files changed, 24 insertions(+), 28 deletions(-) diff --git a/Makefile b/Makefile index c376d2f..7e3f87c 100644 --- a/Makefile +++ b/Makefile @@ -14,8 +14,8 @@ htmldir = $(docdir) pdfdir = $(docdir) mandir = $(prefix)/share/man SHA1_HEADER = -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) diff --git a/cgit.c b/cgit.c index 65c38c0..579db64 100644 --- a/cgit.c +++ b/cgit.c @@ -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; } diff --git a/cgit.h b/cgit.h index 653ec28..28d2772 100644 --- a/cgit.h +++ b/cgit.h @@ -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 index 9a2fb14..7264e61 160000 --- a/git +++ b/git @@ -1 +1 @@ -Subproject commit 9a2fb147f2c61d0cab52c883e7e26f5b7948e3ed +Subproject commit 7264e61d87e58b9d0f5e6424c47c11e9657dfb75 diff --git a/shared.c b/shared.c index 401cf86..07b38ba 100644 --- a/shared.c +++ b/shared.c @@ -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); diff --git a/ui-clone.c b/ui-clone.c index 9445454..027eb56 100644 --- a/ui-clone.c +++ b/ui-clone.c @@ -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); } } diff --git a/ui-log.c b/ui-log.c index ee2a607..31fb783 100644 --- a/ui-log.c +++ b/ui-log.c @@ -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; } diff --git a/ui-tag.c b/ui-tag.c index 3b11226..8f58f14 100644 --- a/ui-tag.c +++ b/ui-tag.c @@ -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; From list at eworm.de Thu Jan 22 06:57:51 2026 From: list at eworm.de (Christian Hesse) Date: Thu, 22 Jan 2026 07:57:51 +0100 Subject: [PATCH 1/1] RFC: git: update to v2.53.0-rc1 In-Reply-To: <20260119134432.232210-1-list@eworm.de> References: <20260119134432.232210-1-list@eworm.de> Message-ID: <20260122065751.54240-1-list@eworm.de> From: Christian Hesse Update to git version v2.53.0-rc1, this requires changes for these upstream commits: * bdbebe5714b25dc9d215b48efbb80f410925d7dd refs: introduce wrapper struct for `each_ref_fn` * 589127caa73090040200989ff4d24c3d54f473f2 packfile: move list of packs into the packfile store * 5a5c7359f77ecd1bc4b0e172563161d602f131d3 refs: drop `current_ref_iter` hack * b6e4cc8c32850315323961659e553d1d14591f7f tag: support arbitrary repositories in parse_tag() * 84f0e60b28de69d1ccb7a51b729af6202b6cf4c8 packfile: move packfile store into object source Signed-off-by: Christian Hesse --- Makefile | 4 ++-- cgit.c | 7 +++---- cgit.h | 3 +-- git | 2 +- shared.c | 5 ++--- ui-clone.c | 22 +++++++++++----------- ui-log.c | 2 +- ui-shared.c | 5 ++--- ui-tag.c | 2 +- 9 files changed, 24 insertions(+), 28 deletions(-) diff --git a/Makefile b/Makefile index c376d2f..d5723d8 100644 --- a/Makefile +++ b/Makefile @@ -14,8 +14,8 @@ htmldir = $(docdir) pdfdir = $(docdir) mandir = $(prefix)/share/man SHA1_HEADER = -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.rc1 +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) diff --git a/cgit.c b/cgit.c index 65c38c0..579db64 100644 --- a/cgit.c +++ b/cgit.c @@ -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; } diff --git a/cgit.h b/cgit.h index 653ec28..28d2772 100644 --- a/cgit.h +++ b/cgit.h @@ -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 index 9a2fb14..83a69f1 160000 --- a/git +++ b/git @@ -1 +1 @@ -Subproject commit 9a2fb147f2c61d0cab52c883e7e26f5b7948e3ed +Subproject commit 83a69f19359e6d9bc980563caca38b2b5729808c diff --git a/shared.c b/shared.c index 401cf86..07b38ba 100644 --- a/shared.c +++ b/shared.c @@ -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); diff --git a/ui-clone.c b/ui-clone.c index 9445454..5a1fab3 100644 --- a/ui-clone.c +++ b/ui-clone.c @@ -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->sources->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); } } diff --git a/ui-log.c b/ui-log.c index ee2a607..31fb783 100644 --- a/ui-log.c +++ b/ui-log.c @@ -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; } diff --git a/ui-tag.c b/ui-tag.c index 3b11226..8f58f14 100644 --- a/ui-tag.c +++ b/ui-tag.c @@ -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; From list at eworm.de Tue Jan 27 17:17:36 2026 From: list at eworm.de (Christian Hesse) Date: Tue, 27 Jan 2026 18:17:36 +0100 Subject: [PATCH 1/1] RFC: git: update to v2.53.0-rc2 In-Reply-To: <20260122065751.54240-1-list@eworm.de> References: <20260122065751.54240-1-list@eworm.de> Message-ID: <20260127171736.252745-1-list@eworm.de> From: Christian Hesse Update to git version v2.53.0-rc2, this requires changes for these upstream commits: * bdbebe5714b25dc9d215b48efbb80f410925d7dd refs: introduce wrapper struct for `each_ref_fn` * 589127caa73090040200989ff4d24c3d54f473f2 packfile: move list of packs into the packfile store * 5a5c7359f77ecd1bc4b0e172563161d602f131d3 refs: drop `current_ref_iter` hack * b6e4cc8c32850315323961659e553d1d14591f7f tag: support arbitrary repositories in parse_tag() * 84f0e60b28de69d1ccb7a51b729af6202b6cf4c8 packfile: move packfile store into object source Signed-off-by: Christian Hesse --- Makefile | 4 ++-- cgit.c | 7 +++---- cgit.h | 3 +-- git | 2 +- shared.c | 5 ++--- ui-clone.c | 22 +++++++++++----------- ui-log.c | 2 +- ui-shared.c | 5 ++--- ui-tag.c | 2 +- 9 files changed, 24 insertions(+), 28 deletions(-) diff --git a/Makefile b/Makefile index c376d2f..f7fde7d 100644 --- a/Makefile +++ b/Makefile @@ -14,8 +14,8 @@ htmldir = $(docdir) pdfdir = $(docdir) mandir = $(prefix)/share/man SHA1_HEADER = -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.rc2 +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) diff --git a/cgit.c b/cgit.c index 65c38c0..579db64 100644 --- a/cgit.c +++ b/cgit.c @@ -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; } diff --git a/cgit.h b/cgit.h index 653ec28..28d2772 100644 --- a/cgit.h +++ b/cgit.h @@ -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 index 9a2fb14..ab380cb 160000 --- a/git +++ b/git @@ -1 +1 @@ -Subproject commit 9a2fb147f2c61d0cab52c883e7e26f5b7948e3ed +Subproject commit ab380cb80b0727f7f2d7f6b17592ae6783e9820c diff --git a/shared.c b/shared.c index 401cf86..07b38ba 100644 --- a/shared.c +++ b/shared.c @@ -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); diff --git a/ui-clone.c b/ui-clone.c index 9445454..5a1fab3 100644 --- a/ui-clone.c +++ b/ui-clone.c @@ -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->sources->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); } } diff --git a/ui-log.c b/ui-log.c index ee2a607..31fb783 100644 --- a/ui-log.c +++ b/ui-log.c @@ -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; } diff --git a/ui-tag.c b/ui-tag.c index 3b11226..8f58f14 100644 --- a/ui-tag.c +++ b/ui-tag.c @@ -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;