<feed xmlns='http://www.w3.org/2005/Atom'>
<title>cgit/cgit.c, branch ch/for-jason</title>
<subtitle>cgit itself, for testing</subtitle>
<id>https://git.untode.su/cgit/atom?h=ch%2Ffor-jason</id>
<link rel='self' href='https://git.untode.su/cgit/atom?h=ch%2Ffor-jason'/>
<link rel='alternate' type='text/html' href='https://git.untode.su/cgit/'/>
<updated>2026-09-18T17:57:35Z</updated>
<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>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>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>
<entry>
<title>cgit: use strchrnul instead of open coding</title>
<updated>2026-05-04T16:28:27Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2026-05-04T16:02:57Z</published>
<link rel='alternate' type='text/html' href='https://git.untode.su/cgit/commit/?id=e7e8cf1801b06a9f7f5092671b0413689a765fe7'/>
<id>urn:sha1:e7e8cf1801b06a9f7f5092671b0413689a765fe7</id>
<content type='text'>
Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>cgit: devirtualize repo_config</title>
<updated>2026-05-04T16:28:27Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2026-05-04T15:50:43Z</published>
<link rel='alternate' type='text/html' href='https://git.untode.su/cgit/commit/?id=5b4e73c203f5f4484d66f043f1e9114daefeb632'/>
<id>urn:sha1:5b4e73c203f5f4484d66f043f1e9114daefeb632</id>
<content type='text'>
There's no reason to pass around function pointers. It was never used
for anything beyond one function.

Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.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://git.untode.su/cgit/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://git.untode.su/cgit/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://git.untode.su/cgit/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://git.untode.su/cgit/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>
