<feed xmlns='http://www.w3.org/2005/Atom'>
<title>cgitext.git/ui-shared.c, branch master</title>
<subtitle>cgitext – CGI for Git extension</subtitle>
<id>https://sayag.it/cgitext.git/atom/ui-shared.c?h=master</id>
<link rel='self' href='https://sayag.it/cgitext.git/atom/ui-shared.c?h=master'/>
<link rel='alternate' type='text/html' href='https://sayag.it/cgitext.git/'/>
<updated>2026-08-01T06:15:38Z</updated>
<entry>
<title>logo: include svg variant for both favicon and logo</title>
<updated>2026-08-01T06:15:38Z</updated>
<author>
<name>Saya Andy</name>
<email>saya.andy@posteo.com</email>
</author>
<published>2026-08-01T06:15:38Z</published>
<link rel='alternate' type='text/html' href='https://sayag.it/cgitext.git/commit/?id=8a90bca75c8d8755016b46747ca943bb7b37140c'/>
<id>urn:sha1:8a90bca75c8d8755016b46747ca943bb7b37140c</id>
<content type='text'>
The reasoning behind using svg as primary defaults is simple – at
close-up it is much neater, plus svg favicon is supported since 2015 in
Firefox, 2020 in Chromium, 2025 in Safari. For old browsers ico is still
kept as a fallback.

The svg was auto-generated using a Python script and then simplified to
a path, but kept close to an original.
</content>
</entry>
<entry>
<title>licensing: add author preambles where changes were done</title>
<updated>2026-07-31T04:38:28Z</updated>
<author>
<name>Saya Andy</name>
<email>saya.andy@posteo.com</email>
</author>
<published>2026-07-30T05:49:23Z</published>
<link rel='alternate' type='text/html' href='https://sayag.it/cgitext.git/commit/?id=306fafc1d1d19c51d7ac24479f49c76272934ce5'/>
<id>urn:sha1:306fafc1d1d19c51d7ac24479f49c76272934ce5</id>
<content type='text'>
Add a copyright for changes done by me, also note in README the nature
of this repo
</content>
</entry>
<entry>
<title>ui-ci: add a "ci" tab which redirects to an external ci system</title>
<updated>2026-07-30T05:26:52Z</updated>
<author>
<name>Saya Andy</name>
<email>saya.andy@posteo.com</email>
</author>
<published>2026-07-30T05:26:52Z</published>
<link rel='alternate' type='text/html' href='https://sayag.it/cgitext.git/commit/?id=b4b4f2325db71041f38902143b28bae94762b111'/>
<id>urn:sha1:b4b4f2325db71041f38902143b28bae94762b111</id>
<content type='text'>
Add a "ci" page which redirects to an external ci system for the ref
being viewed, along with a tab for it in the repository header.

The target is a url template, configurable globally or per repository,
with separate settings for branches and tags because pipelines for the
two commonly live at different locations: on a Jenkins multibranch
pipeline a branch is at job/&lt;name&gt;/job/&lt;ref&gt; while a tag is at
job/&lt;name&gt;/view/tags/job/&lt;ref&gt;. $ref, $repo and $slug are substituted,
$slug being the repository url with any ".git" suffix removed and slashes
replaced by dashes, which is the shape job names usually take.

An explicit repo.ci-url drops the branch and tag urls the repository
would otherwise inherit from the global settings, as it could never take
effect otherwise.

The expansion is written to the Location header verbatim rather than
through cgit_redirect(), which percent-encodes '?', '=' and '%' and would
corrupt any url carrying a query string. An expansion containing CR or LF
is refused so that it cannot smuggle in further headers.

Signed-off-by: Saya Andy &lt;saya.andy@posteo.com&gt;
</content>
</entry>
<entry>
<title>ui-shared: don't list branches when there is no repository</title>
<updated>2026-07-30T05:24:02Z</updated>
<author>
<name>Saya Andy</name>
<email>saya.andy@posteo.com</email>
</author>
<published>2026-07-30T05:24:02Z</published>
<link rel='alternate' type='text/html' href='https://sayag.it/cgitext.git/commit/?id=dbed2ecdf824d154f7d69a624013a02e6e0966be'/>
<id>urn:sha1:dbed2ecdf824d154f7d69a624013a02e6e0966be</id>
<content type='text'>
print_header() fills the branch switcher from the main ref store whenever
ctx.repo is set. For a request which prints a page before
prepare_repo_cmd() has cleared ctx.repo -- an unknown page name for a
repository whose repo.path is broken, for instance -- the ref store has
never been initialized, and get_main_ref_store() aborts after the
response has already begun:

    BUG: refs.c:2301: reference backend is unknown
    get_main_ref_store
    print_header at ui-shared.c:1057
    cgit_print_error_page(fmt="Invalid request")

Add cgit_have_repository() to say whether the repository for this request
was opened, and skip the switcher when it was not.

Signed-off-by: Saya Andy &lt;saya.andy@posteo.com&gt;
</content>
</entry>
<entry>
<title>ui-shared: avoid the memrchr GNU extension</title>
<updated>2026-07-30T05:21:11Z</updated>
<author>
<name>Saya Andy</name>
<email>saya.andy@posteo.com</email>
</author>
<published>2026-07-30T05:21:11Z</published>
<link rel='alternate' type='text/html' href='https://sayag.it/cgitext.git/commit/?id=fbb76f0cb2d77b08e6ae02579dc2a549bff509a2'/>
<id>urn:sha1:fbb76f0cb2d77b08e6ae02579dc2a549bff509a2</id>
<content type='text'>
memrchr() is a GNU extension which glibc and musl provide but macOS does
not, so cgit_set_title_from_path() failed to compile there and the tree
could not be built on macOS at all.

Replace it with a small local helper. The search covers one path
component at a time, so there is nothing to gain from a libc version.

Signed-off-by: Saya Andy &lt;saya.andy@posteo.com&gt;
</content>
</entry>
<entry>
<title>cgit: override die routine globally</title>
<updated>2026-03-10T21:19:00Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2026-03-10T20:26:55Z</published>
<link rel='alternate' type='text/html' href='https://sayag.it/cgitext.git/commit/?id=0d8e5fbc31e1082063bfb5155c35b7869721152b'/>
<id>urn:sha1:0d8e5fbc31e1082063bfb5155c35b7869721152b</id>
<content type='text'>
We don't get any return value from compile_grep_patterns calling
compile_regexp_failed, causing the default die routine to print to
stderr and then for cgit to exit ungracefully.

Instead override the default die routine to show a normal error page.

Perhaps compile_grep_patterns ought to change upstream to return an
error. But this commit here will handle future issues as well, so
perhaps not a bad idea to do anyway.

Link: https://lists.zx2c4.com/pipermail/cgit/2026-March/004982.html
Link: https://lists.zx2c4.com/pipermail/cgit/2026-March/004983.html
Reported-by: Adrian C. &lt;anrxc@sysphere.org&gt;
Reported-by: Aiden Woodruff &lt;aiden@aidenw.net&gt;
Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>ui-log: allow link following to be disabled per-repo</title>
<updated>2026-02-24T10:49:35Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2026-02-24T10:48:54Z</published>
<link rel='alternate' type='text/html' href='https://sayag.it/cgitext.git/commit/?id=0d28d54f0a287ee3e5a12d14ffd2ee23b5e22d76'/>
<id>urn:sha1:0d28d54f0a287ee3e5a12d14ffd2ee23b5e22d76</id>
<content type='text'>
This exists for other CPU heavy operations like blame, but doesn't for
the follow functionality. Add it for that.

Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>ui-shared: don't write &lt;link&gt; if favicon unset</title>
<updated>2026-02-23T23:39:05Z</updated>
<author>
<name>Christian Barcenas</name>
<email>christian@cbarcenas.com</email>
</author>
<published>2025-08-21T19:46:33Z</published>
<link rel='alternate' type='text/html' href='https://sayag.it/cgitext.git/commit/?id=11a6c92def985710eca79733f136b471d474b053'/>
<id>urn:sha1:11a6c92def985710eca79733f136b471d474b053</id>
<content type='text'>
Since the favicon setting defaults to "/favicon.ico", the user can
only unset it with favicon=. However, that would write an empty string
as the config value. Previously, such empty string always satisfied
the if condition. In this case it is better to omit the &lt;link&gt; entirely.

Signed-off-by: Christian Barcenas &lt;christian@cbarcenas.com&gt;
Signed-off-by: Christian Hesse &lt;mail@eworm.de&gt;
</content>
</entry>
<entry>
<title>git: update to v2.53.0</title>
<updated>2026-02-02T19:44:31Z</updated>
<author>
<name>Christian Hesse</name>
<email>mail@eworm.de</email>
</author>
<published>2026-01-19T10:46:27Z</published>
<link rel='alternate' type='text/html' href='https://sayag.it/cgitext.git/commit/?id=d9da9cec9640668f82b2f367fade18eb27b28616'/>
<id>urn:sha1:d9da9cec9640668f82b2f367fade18eb27b28616</id>
<content type='text'>
Update to git version v2.53.0, 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 &lt;mail@eworm.de&gt;
</content>
</entry>
<entry>
<title>git: update to v2.47.0</title>
<updated>2024-10-07T15:34:42Z</updated>
<author>
<name>Christian Hesse</name>
<email>mail@eworm.de</email>
</author>
<published>2024-09-26T17:41:29Z</published>
<link rel='alternate' type='text/html' href='https://sayag.it/cgitext.git/commit/?id=c1733e28d91bea5647e11fe099751fbc839669d7'/>
<id>urn:sha1:c1733e28d91bea5647e11fe099751fbc839669d7</id>
<content type='text'>
Update to git version v2.47.0, this requires changes for these
upstream commits:

* e8207717f1623325fe1c95338fb03c1104ed5687
  refs: add referent to each_ref_fn

Signed-off-by: Christian Hesse &lt;mail@eworm.de&gt;
</content>
</entry>
</feed>
