<feed xmlns='http://www.w3.org/2005/Atom'>
<title>cgitext.git, branch develop</title>
<subtitle>cgitext – CGI for Git extension</subtitle>
<id>https://sayag.it/cgitext.git/atom/?h=develop</id>
<link rel='self' href='https://sayag.it/cgitext.git/atom/?h=develop'/>
<link rel='alternate' type='text/html' href='https://sayag.it/cgitext.git/'/>
<updated>2026-08-15T15:17:12Z</updated>
<entry>
<title>diff: pick refs from web ui</title>
<updated>2026-08-15T15:17:12Z</updated>
<author>
<name>Saya Andy</name>
<email>saya.andy@posteo.com</email>
</author>
<published>2026-08-15T15:17:12Z</published>
<link rel='alternate' type='text/html' href='https://sayag.it/cgitext.git/commit/?id=61aa4378441859ed2851db01d5d1b01ed1aa2458'/>
<id>urn:sha1:61aa4378441859ed2851db01d5d1b01ed1aa2458</id>
<content type='text'>
Beforehand the choice between two refs in diff could not be changed from
web ui (only via url query), and by default it was current and previous
commit. Now it is doable with dropdown menus.
</content>
</entry>
<entry>
<title>theming: include solarized.css theme addon</title>
<updated>2026-08-01T10:50:26Z</updated>
<author>
<name>Saya Andy</name>
<email>saya.andy@posteo.com</email>
</author>
<published>2026-08-01T10:33:19Z</published>
<link rel='alternate' type='text/html' href='https://sayag.it/cgitext.git/commit/?id=3beb4785562b158fc4c4e67185ac488d5bfa5c60'/>
<id>urn:sha1:3beb4785562b158fc4c4e67185ac488d5bfa5c60</id>
<content type='text'>
The solarized.css includes adoption of Solarized Light/Dark themes for
cgit, switching between light and dark variant depending on preferred
color scheme.

It is not used by default, but can be easily switched on with css
directive.
</content>
</entry>
<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>style: replace hardcoded color codes with css variables</title>
<updated>2026-07-31T04:56:31Z</updated>
<author>
<name>Saya Andy</name>
<email>saya.andy@posteo.com</email>
</author>
<published>2026-07-31T04:56:31Z</published>
<link rel='alternate' type='text/html' href='https://sayag.it/cgitext.git/commit/?id=793860dbd6df42d5bbf05542f2292a1c6d30fc76'/>
<id>urn:sha1:793860dbd6df42d5bbf05542f2292a1c6d30fc76</id>
<content type='text'>
In order to: a) do custom theme simpler by just replacing necessary
vars, b) apply this theme to filters as well; the main cgit.css file now
defines CSS vars and uses them in color parameters.
</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>tests: check that a misconfigured repo.path is reported</title>
<updated>2026-07-30T05:27:47Z</updated>
<author>
<name>Saya Andy</name>
<email>saya.andy@posteo.com</email>
</author>
<published>2026-07-30T05:27:47Z</published>
<link rel='alternate' type='text/html' href='https://sayag.it/cgitext.git/commit/?id=1614f25c38d5dd1817cf7651b2fc5e07503fc454'/>
<id>urn:sha1:1614f25c38d5dd1817cf7651b2fc5e07503fc454</id>
<content type='text'>
Check that a repo.path which does not exist or is not a repository is
reported, for the summary page, for an unknown page name and for the ci
page.

cgit used to hang on these requests rather than fail, so the helper puts a
deadline on each one: a regression should fail the test instead of wedging
the suite.

Signed-off-by: Saya Andy &lt;saya.andy@posteo.com&gt;
</content>
</entry>
<entry>
<title>ui-ci: let a ci-filter decide whether the tab is shown</title>
<updated>2026-07-30T05:27:31Z</updated>
<author>
<name>Saya Andy</name>
<email>saya.andy@posteo.com</email>
</author>
<published>2026-07-30T05:27:31Z</published>
<link rel='alternate' type='text/html' href='https://sayag.it/cgitext.git/commit/?id=7162aef3344a4f4f2d7edd2f214d805bd744c20c'/>
<id>urn:sha1:7162aef3344a4f4f2d7edd2f214d805bd744c20c</id>
<content type='text'>
cgit cannot know whether the ref being viewed actually has a pipeline, so
the "ci" tab is offered for every ref and only reveals a missing one once
followed. Probing the ci system from cgit is not an option: the tab is
part of the page header, so it would mean a blocking request for every
page of every repository, cgit links no http client, and job pages are
usually not readable anonymously.

Add a ci filter instead, which receives the ref, whether it is a branch or
a tag, and the expanded url, and answers with its exit status. This keeps
credentials, timeouts and caching in a script, where they belong;
filters/ci-jenkins.sh demonstrates all three against Jenkins' REST API.

The verdict is memoized, so the filter runs once per request rather than
once for the tab and again for the redirect, and it governs the page as
well as the tab, so a hidden tab cannot be reached by typing the url.

Signed-off-by: Saya Andy &lt;saya.andy@posteo.com&gt;
</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>cgit: don't initialize notes when there is no repository</title>
<updated>2026-07-30T05:23:33Z</updated>
<author>
<name>Saya Andy</name>
<email>saya.andy@posteo.com</email>
</author>
<published>2026-07-30T05:23:33Z</published>
<link rel='alternate' type='text/html' href='https://sayag.it/cgitext.git/commit/?id=26fbed3bc58600adc092ab41e094e0fcae60f3b2'/>
<id>urn:sha1:26fbed3bc58600adc092ab41e094e0fcae60f3b2</id>
<content type='text'>
prepare_repo_env() calls load_display_notes() unconditionally, even when
setup_git_directory_gently() has just reported that repo.path is not a
repository. init_notes() then resolves the default notes ref and
dereferences the repository's hash algorithm, which is still NULL:

    EXC_BAD_ACCESS (code=1, address=0x18)
    get_oid_basic(str="refs/notes/commits", len=18) at object-name.c:688
    -&gt; if (len == r-&gt;hash_algo-&gt;hexsz &amp;&amp; !get_oid_hex(str, oid)) {

A typo in repo.path therefore took out the request. On Linux this
segfaults; on macOS nothing consumes the Mach exception, so the faulting
instruction is retried forever and the worker process spins at 100% CPU
instead of dying.

Only load the notes once a repository has been opened. prepare_repo_cmd()
reports the failure immediately afterwards, so such a request now renders
"Failed to open &lt;repo&gt;: No such file or directory".

Signed-off-by: Saya Andy &lt;saya.andy@posteo.com&gt;
</content>
</entry>
</feed>
