Website Summary Files Commits Branches @commit @diff @stats
Commit message (Collapse)AuthorAgeLinesSHA
* ui-repolist: Read HEAD file when deciding on the default branch HEAD sy/customisations
 Syndamia Verified
2026-10-04-2/+29d82d775
|
* ui-shared: (THEME) Move homepage to the beginning, rename to Website
 Syndamia Verified
2026-10-04-5/+5043152c
|
* ui-repolist: Show logo next to repo
 Syndamia Verified
2026-10-04-0/+6f064acf
|
* ui-shared: Use repo logo as favicon when available
 Syndamia Verified
2026-10-04-0/+9880351b
|
* ui-log: Show commit detail in commit message title
 Syndamia Verified
2026-10-02-1/+26272ba15
|
* ui-log: Add commit SHA column
 Syndamia Verified
2026-10-02-0/+136f7519c
|
* ui-log: Show commit verification status next to author
 Syndamia Verified
2026-10-02-0/+232c8b846
|
* ui-stats: (THEME) Rework and reorder stats
 Syndamia Verified
2026-09-27-9/+32592266c
| | | | | | Increase period count to 12, insert a class at the year start of every period, add a paragraph outlining the total period, order periods from largest to smallest, use largest as default.
* ui-diff: (THEME) Rework layout of file diff
 Syndamia Verified
2026-09-27-13/+66494c4d
|
* ui-summary: (THEME) Rework what is shown in summary page
 Syndamia Verified
2026-09-27-12/+10363aa2ec
| | | | | | Now clone and branches are shown next to commits and tags, branches only show name and age, clone does not create links, and file listing (alongside readme) is shown below
* ui-commit: (THEME) Rename and reorder commit element
 Syndamia Verified
2026-09-27-15/+1559125de
|
* ui-shared: (THEME) Rename and reorder pageheader elements
 Syndamia Verified
2026-09-27-22/+15bc6ec37
|
* ui-tree: Remove file mode column
 Syndamia Verified
2026-09-27-4/+3cbda640
|
* ui-tree: Print READMEs below file listings
 Syndamia Verified
2026-09-27-2/+55767e263
|
* html: Improve navigation compatibility
 Syndamia Verified
2026-09-27-6/+252384fa9
| | | | | Primarily adds spaces between different links to make navigation when CSS is not available easier
* ui-tree: Add parent directory link to file listing
 Syndamia Verified
2026-09-27-0/+1b2c665a
|
* ui-tree: Limit size of binary buffer hexdump
 Syndamia Verified
2026-09-27-2/+414e0372
| | | | | Large binary files will generate an enormous page, which will be really slow to use
* ui-tree: Human-readable file sizes
 Syndamia Verified
2026-09-27-1/+947f1595
|
* cgit: Fix defbranch not correctly parsing HEAD
 Syndamia Verified
2026-09-27-1/+181a502f
| | | | | | | | Tracing the code: - refs_resolve_ref_unsafe uses git's refs_read_raw_ref, - which uses refs_read_special_head (on certain occasions), - which uses parse_loose_ref_contents (git/refs/files-backend.c), - which has logic to skip the leading "ref: " inside HEAD
* ui-shared: fix the Expires header on error pages master
 Konstantin Ryabitsev
2026-09-18-1/+38156e859
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <konstantin@linuxfoundation.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* html: use buffered stdio
 Eric Wong
2026-09-18-3/+33599e3df
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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&id2=d6da71a9d16b8cf27f9d8f90692d3625c849cbc8' PATH_INFO=/mirrors/git.git/diff export QUERY_STRING PATH_INFO time ./cgit >/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 <e@80x24.org> Signed-off-by: Alyssa Ross <hi@alyssa.is> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* cgit: Fix guessing default branch
 Baptiste Jonglez
2026-09-18-1/+1bd30873
| | | | | | | | | | | | | | | | | | | | | | | | 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 <git@bitsofnetworks.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* css: Support for dark mode
 Samuel Lidén Borell
2026-09-18-41/+2092e40a36
| | | | | | | | | | | | | | | | | | 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 <samuel@kodafritt.se> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* Bump version
 Jason A. Donenfeld
2026-05-04-1/+10448216
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: fix libc constness warnings
 Jason A. Donenfeld
2026-05-04-7/+105a0f900
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* git: update to v2.54.0
 Christian Hesse
2026-05-04-11/+1544ca1d1
| | | | | | | | | | | | | | | | 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 <mail@eworm.de> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* cgit: truncate all config values at the newline
 Jason A. Donenfeld
2026-05-04-60/+62ed05b10
| | | | | | | | | | | | | | | | | 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 <adrian@doyensec.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* cgit: use strchrnul instead of open coding
 Jason A. Donenfeld
2026-05-04-3/+1e7e8cf1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* cgit: devirtualize repo_config
 Jason A. Donenfeld
2026-05-04-33/+285b4e73c
| | | | | | | There's no reason to pass around function pointers. It was never used for anything beyond one function. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* cache: truncate lock file before filling
 Jason A. Donenfeld
2026-04-13-0/+2829eb07
| | | | | | | | | | | | | | | | | | | | | | lock_slot() opens the lock file with O_RDWR|O_CREAT but without O_TRUNC. If a previous cgit process was killed between lock_slot() and unlock_slot() (e.g. by a CGI timeout or OOM), the stale lock file remains on disk with the old content, and the kernel releases the fcntl lock. The next process to claim the same cache slot then opens this stale lock file, acquires the fcntl lock, writes its key and generated content on top of the old bytes. If the new response is shorter than what was previously in the file, trailing bytes from the old response survive beyond the end of the new content. fstat() in fill_slot() reports the total file size (including the stale tail), and print_slot() faithfully sends all of it -- producing a response that is the correct page followed by a fragment of whatever previously occupied that lock file. Fix this by truncating the lock file after acquiring the lock and before writing the new key. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* cgit: override die routine globally
 Jason A. Donenfeld
2026-03-10-2/+150d8e5fb
| | | | | | | | | | | | | | | | | | 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. <anrxc@sysphere.org> Reported-by: Aiden Woodruff <aiden@aidenw.net> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui-log: allow link following to be disabled per-repo
 Jason A. Donenfeld
2026-02-24-3/+130d28d54
| | | | | | | 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 <Jason@zx2c4.com>
* Bump version
 Jason A. Donenfeld
2026-02-24-1/+161ef851
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* ui-log: don't free diff object when outputting diff
 Jason A. Donenfeld
2026-02-24-0/+129d8c62
| | | | | | | | | In git 2.36, the logic for diff_flush() changed, resulting in our object getting freed, which led to following renames producing garbage commits until it eventually crashed. Fixes: bb02e24 ("git: update to v2.36.0") Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* css: round border edges for deco
 Christian Hesse
2026-02-24-0/+57fee3f6
| | | | Signed-off-by: Christian Hesse <mail@eworm.de>
* css: highlight line in diff...
 Loïc
2026-02-24-0/+505ce954
| | | | | | | ... specified in the URL, with a curved arrow ahead of the line number. Signed-off-by: Loïc <lagiraudiere+cgit@free.fr> Signed-off-by: Christian Hesse <mail@eworm.de>
* Makefile: fix uninstall to remove filters
 Christian Barcenas
2026-02-24-0/+767672fb
| | | | | Signed-off-by: Christian Barcenas <christian@cbarcenas.com> Signed-off-by: Christian Hesse <mail@eworm.de>
* Makefile: fix uninstall to remove js and robots.txt
 Christian Barcenas
2026-02-24-0/+23368408
| | | | | Signed-off-by: Christian Barcenas <christian@cbarcenas.com> Signed-off-by: Christian Hesse <mail@eworm.de>
* ui-shared: don't write <link> if favicon unset
 Christian Barcenas
2026-02-24-1/+111a6c92
| | | | | | | | | | Since the favicon setting defaults to "/favicon.ico", the user can only unset it with favicon=. However, that would write an empty string as the config value. Previously, such empty string always satisfied the if condition. In this case it is better to omit the <link> entirely. Signed-off-by: Christian Barcenas <christian@cbarcenas.com> Signed-off-by: Christian Hesse <mail@eworm.de>
* scan-tree: fix error caused by missing parameter name
 Kian Kasad
2026-02-24-1/+2e9beaff
| | | | | | | | | | This fixes an error which was introduced by 2f50b47c72cbc4270bbd12ae7f520486d5f42736. Git 2.42.0 added a new argument to config_fn_t, and it was added to gitconfig_config(), but not named. This causes compile warnings/errors. This commit fixes that by naming the new parameter, and marking it unused. Signed-off-by: Christian Hesse <mail@eworm.de>
* git: update to v2.53.0
 Christian Hesse
2026-02-02-26/+22d9da9ce
| | | | | | | | | | | | | | | | | | | | | | 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 <mail@eworm.de>
* git: update to v2.52.0
 Christian Hesse
2025-11-17-4/+41b79eec
| | | | | | | | | | | | | | | | 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 <mail@eworm.de>
* git: update to v2.51.2
 Christian Hesse
2025-10-27-1/+1251ee33
| | | | | | Update to git version v2.51.2, no additional changes required. Signed-off-by: Christian Hesse <mail@eworm.de>
* git: update to v2.51.1
 Christian Hesse
2025-10-16-19/+19883304c
| | | | | | | | | | 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 <mail@eworm.de>
* git: update to v2.51.0
 Christian Hesse
2025-08-18-3/+2012870f
| | | | | | | | | | Update to git version v2.51.0, this requires changes for these upstream commits: * 8f49151763cb81adf4bcec53c1ae67057081b02d object-store: rename files to "odb.{c,h}" Signed-off-by: Christian Hesse <mail@eworm.de>
* git: update to v2.50.1
 Christian Hesse
2025-07-08-1/+120ac8f5
| | | | | | Update to git version v2.50.1, no additional changes required. Signed-off-by: Christian Hesse <mail@eworm.de>
* git: update to v2.50.0
 Christian Hesse
2025-06-16-1/+1d8095e0
| | | | | | Update to git version v2.50.0, no additional changes required. Signed-off-by: Christian Hesse <mail@eworm.de>
* git: update to v2.49.0
 Christian Hesse
2025-03-15-4/+10994d3fe
| | | | | | | | | | Update to git version v2.49.0, this requires changes for these upstream commits: * 88dd321cfedc6ee190dfafe4670a83ea33cdf4a3 path: drop `git_path()` in favor of `repo_git_path()` Signed-off-by: Christian Hesse <mail@eworm.de>
* git: update to v2.48.1
 Christian Hesse
2025-01-14-1/+1ce4a66b
| | | | | | Update to git version v2.48.0, no additional changes required. Signed-off-by: Christian Hesse <mail@eworm.de>
* git: update to v2.48.0
 Christian Hesse
2025-01-10-1/+1be06bed
| | | | | | Update to git version v2.48.0, no additional changes required. Signed-off-by: Christian Hesse <mail@eworm.de>