AgeCommit message (Collapse)AuthorLines
Check the age hook picks the right dateBryce Kwon-7/+24
The age fixture had one branch whose author and committer dates were the same, and its only tag was lightweight on that commit. Sorting oldest first, writing the author date or reading every ref rather than the branches all passed, and the expected date came from the same for-each-ref the hook runs. The dates now disagree on every one of those points and the hook's answer is held to a literal date, under every shell.
Move the later tests to the config writersBryce Kwon-2/+2
The one-line request wrappers go with them. Configs with several repositories, a key out of place on purpose, the cache on or no repository of their own stay written out.
Keep the age hook quiet when it cannot writeBryce Kwon-0/+23
Keep the commit-graph current in an example hookBryce Kwon-1/+23
cgit's log, blame and graph pages read commits from the commit-graph when a repository has one, and its changed path filters let a walk limited to one file skip the commits that never touched it. git gc writes a graph only now and then and starts those filters only when a write asks for them, so the hook writes a split layer with them after each push.
Drop only the cache a push makes staleBryce Kwon-17/+91
The hook cleared every slot on a push to any repository. cgit writes the request a slot answers at its head, so the hook now reads it back and drops only the pushed repository's pages and the index. It finds the repository's url from scan-path or hooks.cgiturl, and with neither it clears everything as before.
Keep the age hook's directory group writableBryce Kwon-0/+20
The hook forced a 022 umask, so in a repository shared with a group the first pusher owned info/web and every other member's push failed to write the age file there.
Keep the cache hook's rm errors from pushersBryce Kwon-0/+34
Only the exit status was hidden, so a pusher without write access to the cache root saw a permission error per cached page, against what the hook's own comment promised.