summaryrefslogtreecommitdiffstats
path: root/container/git-http-backend.cgi
Commit message (Collapse)AuthorAgeFilesLines
* Only build the access control executableHEADmaindev2026-11-151-12/+0
| | | | | | | | | | | The container image and all the server configuration (Dockerfile, entrypoint, cgitrc, sshd, lighttpd, create-repo, git-host-key) move to the git-host project. This repo is now just the program: cmd/, src/, test/, the Makefile that builds git-authz and installs it, and the example policy - the same cmd/src/test/obj layout the reference projects use. The CI pipeline keeps the compile-and-test gate (strict, test, sanitizer, install) and drops the container-build job, which belongs to git-host now.
* Comments: cut to what the code cannot saydev2026-11-141-12/+4
| | | | | | | | | | | | | | | | | | | | | | | | The comments had grown into essays. A file header explaining why the file exists, then a paragraph above each function restating what the next eight lines do, then a paragraph above that one explaining why that matters. The reader gets no further than the first paragraph, and the second is the one that goes stale: it describes code that has since changed, and nothing fails when it does. Cut by about half. What is left is the three things a comment can do that code cannot: say why the constraint exists (no regex because a hook must not depend on what might be missing at 3am), say what is not obvious from the shape (a bare ref name is a branch, never a tag; the seventh field of /etc/passwd is the shell), and say where it hurts (the NULL in an execvp array, the mode and owner that have to survive an atomic rewrite, the child that must not keep the hook's stdin). Block comments became // lines, which is also what the other C trees here use, and the file headers went to two or three lines. Section banners stayed: they are navigation, not prose. Behaviour is unchanged and the suites prove it: 171 direct checks, 162 behavioural, clean under -Werror and under ASan/UBSan.
* container: the host, built from the program's own installdev2026-11-131-0/+20
The image is two stages: one compiles, runs the suite and installs into a staging root, the other is the host and receives that staging root whole. The reason for the copy-whole is that the paths in the image are then the paths `make install` produces - including the hook symlink and its relative target - rather than a second list of destinations kept in a Dockerfile, which is how an image and a build start to disagree about where the hook is. The build stage is Alpine so the binary is musl-linked like the rest of the runtime image; a glibc binary would fail as "no such file" about a file that is plainly there. `make test` runs in that stage, so an image built from a tree whose tests fail does not get to exist. The lighttpd config, sshd config, CGI shim, cgitrc and the two operator tools come from the shell implementation, with the comments corrected: there is no refcheck any more, and the hook the comments point at is now a symlink to this binary. Nothing about the wiring changed, which is the point - the C program drops into a host that was already built around one hook and one policy file.