AgeCommit message (Collapse)AuthorLines
Pass over a notes ref that names no treeBryce Kwon-0/+7
A pusher can point refs/notes/commits or a signature notes ref at any object, and git dies loading one that is no tree, which ended every page of the repository, the dumb transport included. Such a ref now counts as absent.
Hold object sizes in size_t as git 2.55 doesBryce Kwon-2/+2
Git 2.55 moved object sizes from unsigned long to size_t. The two are the same type on 64-bit hosts, but not on a 32-bit one, where GCC 14 rejects the mismatched pointers, so cgit stopped compiling there.
Share the max-blob-size check and its refusalBryce Kwon-0/+7
Five copies of the test and four of the error page had to agree by hand. The new check pins the four refusals, which no test covered.
Pass callbacks to git by addressBryce Kwon-0/+5
ISO C has no conversion between a function pointer and void *, so the callbacks handed through git's data pointers and the write found by dlsym stopped the pedantic half of a DEVELOPER=1 build.
Keep string literals behind const pointersBryce Kwon-1/+1
Git's DEVELOPER=1 build turns on -Wwrite-strings as an error, and the literals stored through plain char pointers failed cgit's own objects there. The exec filter's argv takes the cast execvp needs once, the way git's run-command does.
Gate a readme ending in a colon like a disk pathBryce Kwon-0/+6
trust-scan-config passed any readme holding a colon as a tracked file, while the parser takes one only when a path follows the colon, so a scanned repository could still name a file on disk outside itself. The two now share one test.
Replace the stray bytes of text that is not UTF-8Bryce Kwon-0/+12
A commit whose encoding header names something iconv cannot convert, or whose text is labelled UTF-8 without being it, reached a page declared UTF-8 with its bytes untouched. The atom feed already replaced them, so its UTF-8 reader moves to shared.c and every ident, subject, message and tag text passes through it.
Limit rawdiff to the requested pathBryce Kwon-0/+5
The diff and patch pages honour the path in the url, which the parameter table documents for every page, but rawdiff never handed it to git and answered with the whole diff.
Harden the request path, scan and error recoveryBryce Kwon-6/+20
Clean up the whole treeBryce Kwon-13/+8
Restyle the sources and fix the audit's findingsBryce Kwon-0/+92