<feed xmlns='http://www.w3.org/2005/Atom'>
<title>cgit, branch ch/git-2-56</title>
<subtitle>cgit itself, for testing</subtitle>
<id>https://git.untode.su/cgit/atom?h=ch%2Fgit-2-56</id>
<link rel='self' href='https://git.untode.su/cgit/atom?h=ch%2Fgit-2-56'/>
<link rel='alternate' type='text/html' href='https://git.untode.su/cgit/'/>
<updated>2026-09-30T06:39:37Z</updated>
<entry>
<title>git: update to v2.56.0</title>
<updated>2026-09-30T06:39:37Z</updated>
<author>
<name>Christian Hesse</name>
<email>mail@eworm.de</email>
</author>
<published>2026-09-14T13:01:18Z</published>
<link rel='alternate' type='text/html' href='https://git.untode.su/cgit/commit/?id=d260731b378f6d93e4728accec5acd4bd3255190'/>
<id>urn:sha1:d260731b378f6d93e4728accec5acd4bd3255190</id>
<content type='text'>
Update to git version v2.56.0, this requires a change for this
upstream commit:

* 88d06b1c911e8491029ef24e96e3f412ce24c2ae
  pathspec: match and original in pathspec_item are const

Signed-off-by: Christian Hesse &lt;mail@eworm.de&gt;
Reviewed-by: John Keeping &lt;john@keeping.me.uk&gt;
</content>
</entry>
<entry>
<title>git: update to v2.55.0</title>
<updated>2026-09-18T17:57:35Z</updated>
<author>
<name>Christian Hesse</name>
<email>mail@eworm.de</email>
</author>
<published>2026-06-17T19:44:45Z</published>
<link rel='alternate' type='text/html' href='https://git.untode.su/cgit/commit/?id=2a299e141eac453fbb19078bd71651873ae95ae7'/>
<id>urn:sha1:2a299e141eac453fbb19078bd71651873ae95ae7</id>
<content type='text'>
Update to git version v2.55.0, this requires a change for this
upstream commit:

* a80a8e3ea6a070185840219778df24db832899f6
  setup: stop using `the_repository` in `setup_git_directory_gently()`

* ffe8005b9d8e0cf1b5d5d796ca4da76fbe219011
  t: detect errors outside of test cases

Signed-off-by: Christian Hesse &lt;mail@eworm.de&gt;
</content>
</entry>
<entry>
<title>ui-shared: fix the Expires header on error pages</title>
<updated>2026-09-18T11:51:15Z</updated>
<author>
<name>Konstantin Ryabitsev</name>
<email>konstantin@linuxfoundation.org</email>
</author>
<published>2026-08-25T15:07:25Z</published>
<link rel='alternate' type='text/html' href='https://git.untode.su/cgit/commit/?id=156e859aad4c98a169ce4c49e839cae41a28f432'/>
<id>urn:sha1:156e859aad4c98a169ce4c49e839cae41a28f432</id>
<content type='text'>
page.expires is an absolute time: the normal path seeds it from
page.modified and adds the relevant TTL in seconds. The error page
instead assigns cache-dynamic-ttl directly, which is a count of minutes
and carries no base, so every error page cgit has produced since
"ui-shared: cache errors for dynamic TTL" reports

  Expires: Thu, 01 Jan 1970 00:00:05 GMT

five seconds past the epoch, which is the value of the default TTL read
as seconds. The intent of that change was to stop errors being cached
forever; the effect is that they are never cached at all, since every
downstream cache is told the response was already stale.

Seed the value from page.modified and scale the TTL to seconds, matching
what calc_ttl() does for ordinary pages. prepare_context() sets
page.modified before anything can produce an error page, so the base is
always available.

Add a test. The header can be checked without any date arithmetic: a TTL
of zero has to reproduce Last-Modified exactly, and a non-zero one has
to differ from it without falling back to the epoch.

Fixes: c5975ae ("ui-shared: cache errors for "dynamic TTL"")
Signed-off-by: Konstantin Ryabitsev &lt;konstantin@linuxfoundation.org&gt;
Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>html: use buffered stdio</title>
<updated>2026-09-18T11:48:51Z</updated>
<author>
<name>Eric Wong</name>
<email>e@80x24.org</email>
</author>
<published>2026-05-21T13:11:10Z</published>
<link rel='alternate' type='text/html' href='https://git.untode.su/cgit/commit/?id=599e3df55ff0ce7387172c16cba269d545019ed3'/>
<id>urn:sha1:599e3df55ff0ce7387172c16cba269d545019ed3</id>
<content type='text'>
Our generation of HTML triggers many small write(2) syscalls
which is inefficient.

Time output on a horrible query against my git.git mirror
shows significant performance improvement:

QUERY_STRING='id=2b93bfac0f5bcabbf60f174f4e7bfa9e318e64d5&amp;id2=d6da71a9d16b8cf27f9d8f90692d3625c849cbc8'
PATH_INFO=/mirrors/git.git/diff
export QUERY_STRING PATH_INFO
time ./cgit &gt;/dev/null

Before:
real    0m1.585s
user    0m0.904s
sys     0m0.658s

After:
real    0m0.750s
user    0m0.666s
sys     0m0.076s

Signed-off-by: Eric Wong &lt;e@80x24.org&gt;
Signed-off-by: Alyssa Ross &lt;hi@alyssa.is&gt;
Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>cgit: Fix guessing default branch</title>
<updated>2026-09-18T11:46:59Z</updated>
<author>
<name>Baptiste Jonglez</name>
<email>git@bitsofnetworks.org</email>
</author>
<published>2026-02-27T15:51:11Z</published>
<link rel='alternate' type='text/html' href='https://git.untode.su/cgit/commit/?id=bd308735b3cfd40a57b20723a6e6862bf8303dc0'/>
<id>urn:sha1:bd308735b3cfd40a57b20723a6e6862bf8303dc0</id>
<content type='text'>
Even when HEAD is set to "main" in a repository, cgit still uses the
"master" branch to detect the age of the last commit.

Example:

    $ cat repositories/openwrt/openwrt.git/HEAD
    ref: refs/heads/main

    $ stat repositories/openwrt/openwrt.git/refs/heads/master
    Modify: 2024-02-22 23:00:01.285731731 +0000

    $ stat repositories/openwrt/openwrt.git/refs/heads/main
    Modify: 2026-02-27 15:33:49.506017172 +0000

In this situation, cgit displays "25 months" for this repository on the index page.

I guess the internal format for HEAD has changed at some point, so it
needs to be taken into account when parsing it in cgit.

Signed-off-by: Baptiste Jonglez &lt;git@bitsofnetworks.org&gt;
Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>css: Support for dark mode</title>
<updated>2026-09-18T10:18:33Z</updated>
<author>
<name>Samuel Lidén Borell</name>
<email>samuel@kodafritt.se</email>
</author>
<published>2023-01-29T16:55:29Z</published>
<link rel='alternate' type='text/html' href='https://git.untode.su/cgit/commit/?id=2e40a36b56f26593fe8fab4f07ed831395d5f0d2'/>
<id>urn:sha1:2e40a36b56f26593fe8fab4f07ed831395d5f0d2</id>
<content type='text'>
Modern browsers have a "dark mode" preference, which enables alternate
styles on web sites that support this.

This patch adds a dark color scheme, that is automatically activated
via a CSS @media query.

Older browsers that do not support color schemes will simply show the
light scheme, but possibly without syntax highlighting.

Note that filters that use color (such as source highlighters) and
logotypes may need to be updated to work with a black background!
See the updated files in the filters/ directory.

Signed-off-by: Samuel Lidén Borell &lt;samuel@kodafritt.se&gt;
Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>Bump version</title>
<updated>2026-05-04T21:03:51Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2026-05-04T16:59:41Z</published>
<link rel='alternate' type='text/html' href='https://git.untode.su/cgit/commit/?id=044821677c774cd24f25f1818ea51d09cc64b006'/>
<id>urn:sha1:044821677c774cd24f25f1818ea51d09cc64b006</id>
<content type='text'>
Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.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://git.untode.su/cgit/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>git: update to v2.54.0</title>
<updated>2026-05-04T17:01:20Z</updated>
<author>
<name>Christian Hesse</name>
<email>mail@eworm.de</email>
</author>
<published>2026-04-13T06:18:52Z</published>
<link rel='alternate' type='text/html' href='https://git.untode.su/cgit/commit/?id=44ca1d1ec8eee7f4440fbfd613fc1072a14b441c'/>
<id>urn:sha1:44ca1d1ec8eee7f4440fbfd613fc1072a14b441c</id>
<content type='text'>
Update to git version v2.54.0, 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 &lt;mail@eworm.de&gt;
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://git.untode.su/cgit/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>
</feed>
