AgeCommit message (Collapse)AuthorLines
Find libc's write when git writes firstBryce Kwon-0/+4
A Lua build replaces write, and git can write before cmd_main reaches cgit_init_filters, as it does when GIT_TRACE2 is set, which called through a null pointer and crashed every request.
Name every Lua filter failure in the logBryce Kwon-9/+17
A script raising anything but a string handed die a null to print, and a Lua state that could not be created was used anyway once the filter closed.
Let a Lua script write while it loadsBryce Kwon-2/+6
A script's top level runs before cgit hooks stdout for it, and the unhook html() began with tripped an assert that aborted cgit.
Hand the about filter the tree url its links needBryce Kwon-1/+3
With nothing below the about page, a readme's relative links have to be written against the tree, and only cgit knows how this site spells the url of a tree page and which ref the readme was read from. Both reach the filter already escaped for a url, built by the same writer as cgit's own links.
Pass callbacks to git by addressBryce Kwon-2/+7
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-3/+4
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.
End a request quietly when the client has goneBryce Kwon-0/+5
A write that failed with EPIPE on an uncached page died into an error page, which died again at exit when the page could not be sent either, and git logged a recursion warning on every dropped connection. A filter that exits early fails a write the same way, so the quiet exit is kept for writes that reach the client itself.
Keep the Lua-less build compilingBryce Kwon-0/+6
`cgit_abort_filters` unhooks the Lua write interposer under NO_LUA too, where neither the hook nor its state exists, so `make NO_LUA=1` and the default mode of `tools/release-build.sh` have not compiled since the die path learned to take stdout back from a filter. The suite now builds that variant into `build/nolua` and runs it, and a `lua:` filter in such a build is refused with a message naming the cause instead of an unknown filter type.
Harden the request path, scan and error recoveryBryce Kwon-13/+43
Fail cleanly when a filter cannot runBryce Kwon-5/+17
A filter program that could not be run answered with two responses, and a filter that exited without reading its input ended cgit with the page half written.
Split trailers out of the commit messageBryce Kwon-0/+3
Clean up the whole treeBryce Kwon-32/+16
Harden the lua filter failure pathsBryce Kwon-5/+9
Trim the comments and dead code across the treeBryce Kwon-36/+17
Restyle the sources and fix the audit's findingsBryce Kwon-146/+178
Gather page output into one bufferBryce Kwon-0/+10
Settle the names, types and layout of the sourcesBryce Kwon-9/+9
Remove the owner filter hookBryce Kwon-6/+0
Point the fork's links and credits at itselfBryce Kwon-1/+1
AUTHORS now records the upstream developers as the project's history rather than as maintainers of the fork.
Reorganize into source, assets and librariesBryce Kwon-0/+457
The C sources move to source/, the served files to assets/, the bundled Git submodule to libraries/git and the filter scripts to extensions/. Everything the build generates now lands in build/, so a clean is a single remove and the tree stays clean.