<feed xmlns='http://www.w3.org/2005/Atom'>
<title>cgit, branch jd/zx2c4-deployment</title>
<subtitle>A hyperfast web frontend for git repositories written in C.</subtitle>
<id>https://git.zx2c4.com/cgit/atom/?h=jd%2Fzx2c4-deployment</id>
<link rel='self' href='https://git.zx2c4.com/cgit/atom/?h=jd%2Fzx2c4-deployment'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/cgit/'/>
<updated>2026-09-18T11:52:07Z</updated>
<entry>
<title>filters: add syntax-highlighting.js</title>
<updated>2026-09-18T11:52:07Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2026-09-16T12:45:54Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/cgit/commit/?id=d4940d531ba0bdffbfb95e5c0d299956bd3e4e6c'/>
<id>urn:sha1:d4940d531ba0bdffbfb95e5c0d299956bd3e4e6c</id>
<content type='text'>
Move to using client-side highlighting, combining pygment's filetype
detection with highlight.js's actual highlighting logic. Use pygment's
pastie, but also bring in a generated dark version of it.

Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>html: double escape literal + in URLs</title>
<updated>2026-09-18T11:52:07Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2018-12-22T01:38:09Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/cgit/commit/?id=30559ffdb0114e3183d890b559aa6d8e149d8525'/>
<id>urn:sha1:30559ffdb0114e3183d890b559aa6d8e149d8525</id>
<content type='text'>
It's unclear whether this is correct or whether my server is double
decoding.

Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>css: switch monospace fonts</title>
<updated>2026-09-18T11:52:07Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2016-08-02T02:15:01Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/cgit/commit/?id=026427aff3fba875dee4345d23e993e6b1f88220'/>
<id>urn:sha1:026427aff3fba875dee4345d23e993e6b1f88220</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Steal kernel.org's libravatar lua.</title>
<updated>2026-09-18T11:52:07Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2014-03-19T08:58:41Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/cgit/commit/?id=52ef8657d61c07e49e84d9fd4112fa9fad7db6d8'/>
<id>urn:sha1:52ef8657d61c07e49e84d9fd4112fa9fad7db6d8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>ZX2C4 specific patches.</title>
<updated>2026-09-18T11:52:07Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2012-07-10T17:26:44Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/cgit/commit/?id=4590963d46acd2d4bcb879b145bad0b2cc33f78c'/>
<id>urn:sha1:4590963d46acd2d4bcb879b145bad0b2cc33f78c</id>
<content type='text'>
</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.zx2c4.com/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.zx2c4.com/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.zx2c4.com/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.zx2c4.com/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.zx2c4.com/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>
</feed>
