Diff options
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Drop only the cache a push makes stale
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.
-rwxr-xr-xcustom/hooks/post-receive.cgit-cache115
-rwxr-xr-xtests/t0507-hooks.sh108
2 files changed, 195 insertions, 28 deletions