<feed xmlns='http://www.w3.org/2005/Atom'>
<title>cgitext.git/shared.c, branch master</title>
<subtitle>cgitext – CGI for Git extension</subtitle>
<id>https://sayag.it/cgitext.git/atom/shared.c?h=master</id>
<link rel='self' href='https://sayag.it/cgitext.git/atom/shared.c?h=master'/>
<link rel='alternate' type='text/html' href='https://sayag.it/cgitext.git/'/>
<updated>2026-07-31T04:38:28Z</updated>
<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: 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>global: fix libc constness warnings</title>
<updated>2026-05-04T21:03:51Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2026-05-04T21:03:22Z</published>
<link rel='alternate' type='text/html' href='https://sayag.it/cgitext.git/commit/?id=5a0f900569f421422bd7511a45c7346c7668e710'/>
<id>urn:sha1:5a0f900569f421422bd7511a45c7346c7668e710</id>
<content type='text'>
Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>cgit: truncate all config values at the newline</title>
<updated>2026-05-04T16:28:27Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2026-05-04T16:13:13Z</published>
<link rel='alternate' type='text/html' href='https://sayag.it/cgitext.git/commit/?id=ed05b1054df10a2fbc68000cfdd429daec03a456'/>
<id>urn:sha1:ed05b1054df10a2fbc68000cfdd429daec03a456</id>
<content type='text'>
These would be largely invalid anyway (save, I suppose, for Linux file
paths that technically can contain new lines).

The actual problem is that these get printed back out into cached -- and
trusted -- cgitrc files, and if the fields have newlines, the git-config
way of less trusted users configuring repos on a shared system can be
abused to inject newlines, which then can be used to smuggle global
options (including filters, which execute code) into the cached cgitrc.

So now, only ever duplicate up to the newline, when dealing with these
inputs.

Reported-by: Adrian Denkiewicz &lt;adrian@doyensec.com&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>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.52.0</title>
<updated>2025-11-17T20:39:40Z</updated>
<author>
<name>Christian Hesse</name>
<email>mail@eworm.de</email>
</author>
<published>2025-11-03T19:36:50Z</published>
<link rel='alternate' type='text/html' href='https://sayag.it/cgitext.git/commit/?id=1b79eecd9c5c71237ca8960319dc4d858895220d'/>
<id>urn:sha1:1b79eecd9c5c71237ca8960319dc4d858895220d</id>
<content type='text'>
Update to git version v2.52.0, this requires changes for these
upstream commits:

* 9f6dfe43c8a55b833ae16486bcafe29b543461f9
  string-list: align string_list_split() with its _in_place() counterpart

* 78237ea53d6546aeab7adb2c7547a1177311ccde
  packfile: split up responsibilities of `reprepare_packed_git()`

* 751808b2a18acba76b824aed4d8b7442bd7f5fca
  packfile: refactor `get_packed_git()` to work on packfile store

Signed-off-by: Christian Hesse &lt;mail@eworm.de&gt;
</content>
</entry>
<entry>
<title>git: update to v2.51.1</title>
<updated>2025-10-16T07:49:45Z</updated>
<author>
<name>Christian Hesse</name>
<email>mail@eworm.de</email>
</author>
<published>2025-10-16T07:25:33Z</published>
<link rel='alternate' type='text/html' href='https://sayag.it/cgitext.git/commit/?id=883304cb0ec4d27df33008f945e81174c26baa30'/>
<id>urn:sha1:883304cb0ec4d27df33008f945e81174c26baa30</id>
<content type='text'>
Update to git version v2.51.1, this requires changes for these
upstream commits:

* e1d062e8ba0b72f49e9ef9713cc7011c330baab8
  odb: drop deprecated wrapper functions

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