From aiden at aidenw.net Fri Apr 3 03:27:20 2026 From: aiden at aidenw.net (Aiden Woodruff) Date: Thu, 2 Apr 2026 23:27:20 -0400 Subject: [PATCH] replace memrchr with strrchr Message-ID: <20260403032740.93724-1-aiden@aidenw.net> - ui-shared.c (cgit_set_title_from_path): remove memrchr which is less widely available (e.g. it is missing on macOS) and replace with an implementation that copies the path and uses strrchr. Signed-off-by: Aiden Woodruff --- I tested locally and the chevrons are correctly retained in the title along with the path components. Although memrchr is in glibc, it is not available everywhere and this patch was necessary for building on my system. --- ui-shared.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ui-shared.c b/ui-shared.c index 219b830..a60b0a8 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -1244,17 +1244,19 @@ void cgit_print_snapshot_links(const struct cgit_repo *repo, const char *ref, void cgit_set_title_from_path(const char *path) { - struct strbuf sb = STRBUF_INIT; - const char *slash, *last_slash; - if (!path) return; - for (last_slash = path + strlen(path); (slash = memrchr(path, '/', last_slash - path)) != NULL; last_slash = slash) { + struct strbuf sb = STRBUF_INIT; + char *slash, *last_slash, *path_copy = xstrdup(path); + + for (last_slash = path_copy + strlen(path_copy); (slash = strrchr(path_copy, '/')) != NULL; last_slash = slash) { strbuf_add(&sb, slash + 1, last_slash - slash - 1); strbuf_addstr(&sb, " \xc2\xab "); + *slash = '\0'; } - strbuf_add(&sb, path, last_slash - path); + strbuf_add(&sb, path_copy, last_slash - path_copy); strbuf_addf(&sb, " - %s", ctx.page.title); ctx.page.title = strbuf_detach(&sb, NULL); + free(path_copy); } -- 2.50.1 (Apple Git-155) From aiden at aidenw.net Sun Apr 5 02:25:17 2026 From: aiden at aidenw.net (Aiden Woodruff) Date: Sat, 4 Apr 2026 22:25:17 -0400 Subject: Follow up for mobile responsiveness patch series Message-ID: Hi Rito, As a user of cgit, I like most of the current mobile experience. I do not see what is wrong with the "panzooming dance". The current summary layout shows everything at a glance, and then I zoom in where I want. However, the layout does suffer when the main content (summary rows or code) overflows the width. In those cases it is in my opinion a clear visibility improvement to scroll horizontally. In general, I do not think any content (especially controls like the search bar) should be hidden from view. It might not be immediately clear that there are elements off-screen. To fix only the main content overflow issue, the following simpler, CSS-only patch would suffice. But it is worth mentioning that CSS can easily be customized in any installation. --- cgit.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cgit.css b/cgit.css index a37defe..118e75c 100644 --- a/cgit.css +++ b/cgit.css @@ -117,6 +117,9 @@ div#cgit div.content { margin: 0px; padding: 2em; border-bottom: solid 3px #ccc; + overflow-x: auto; + max-width: 100%; + -webkit-overflow-scrolling: touch; } -- Aiden Woodruff -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 265 bytes Desc: not available URL: From list at eworm.de Mon Apr 13 07:30:04 2026 From: list at eworm.de (Christian Hesse) Date: Mon, 13 Apr 2026 09:30:04 +0200 Subject: [PATCH 1/1] RFC: git: update to v2.54.0-rc1 Message-ID: <20260413073004.69983-1-list@eworm.de> From: Christian Hesse Update to git version v2.54.0-rc1, this requires changes for these upstream commits: * d9ecf268ef3f69130fa269012318470d908978f6 odb: embed base source in the "files" backend * cb506a8a69c953f7b87bb3ae099e0bed8218d3ab odb: introduce "files" source ... and probably more related. Signed-off-by: Christian Hesse --- Makefile | 4 ++-- git | 2 +- ui-clone.c | 24 ++++++++++++++---------- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 16bfc55..e1db470 100644 --- a/Makefile +++ b/Makefile @@ -14,8 +14,8 @@ htmldir = $(docdir) pdfdir = $(docdir) mandir = $(prefix)/share/man SHA1_HEADER = -GIT_VER = 2.53.0 -GIT_URL = https://www.kernel.org/pub/software/scm/git/git-$(GIT_VER).tar.xz +GIT_VER = 2.54.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/git b/git index 67ad421..2b39a27 160000 --- a/git +++ b/git @@ -1 +1 @@ -Subproject commit 67ad42147a7acc2af6074753ebd03d904476118f +Subproject commit 2b39a27d40682c09ac1c031f099ee602061597cd diff --git a/ui-clone.c b/ui-clone.c index 5a1fab3..e11f496 100644 --- a/ui-clone.c +++ b/ui-clone.c @@ -33,22 +33,26 @@ static int print_ref_info(const struct reference *ref, void *cb_data) static void print_pack_info(void) { - struct packfile_list_entry *e; + struct odb_source *source; char *offset; ctx.page.mimetype = "text/plain"; ctx.page.filename = "objects/info/packs"; cgit_print_http_headers(); odb_reprepare(the_repository->objects); - 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 = p->pack_name; - htmlf("P %s\n", offset); + for (source = the_repository->objects->sources; source; source = source->next) { + struct odb_source_files *files = odb_source_files_downcast(source); + struct packfile_list_entry *e; + for (e = files->packed->packs.head; 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 = p->pack_name; + htmlf("P %s\n", offset); + } } } }