From d8a045c91469b1d121b8fd14dffaa367b194831d Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sun, 6 Sep 2026 21:46:52 -1000 Subject: Clean up the whole tree --- custom/hooks/post-receive.cgit-age | 3 +-- custom/hooks/post-receive.cgit-cache | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'custom/hooks') diff --git a/custom/hooks/post-receive.cgit-age b/custom/hooks/post-receive.cgit-age index b91f950..48b17fc 100755 --- a/custom/hooks/post-receive.cgit-age +++ b/custom/hooks/post-receive.cgit-age @@ -22,8 +22,7 @@ agefile="$(git rev-parse --git-dir)"/info/web/last-modified # history still counts as recent activity. Branch tips only, since an # annotated tag carries no committer date of its own and would sort in as an # empty line. -date="$(git for-each-ref --sort=-committerdate --count=1 \ - --format='%(committerdate:iso8601)' refs/heads/)" +date="$(git for-each-ref --sort=-committerdate --count=1 --format='%(committerdate:iso8601)' refs/heads/)" # A repository with no branches keeps whatever cgit already had, rather than # being handed an empty file. diff --git a/custom/hooks/post-receive.cgit-cache b/custom/hooks/post-receive.cgit-cache index 4825a44..21550a9 100755 --- a/custom/hooks/post-receive.cgit-cache +++ b/custom/hooks/post-receive.cgit-cache @@ -33,5 +33,4 @@ cache_root=/var/cache/cgit # Everything directly under the cache root is a cache file, so the only thing # worth keeping is the lock files, which belong to writers still working. # The "! -name . -prune" pair is how POSIX find stays out of subdirectories. -find "$cache_root"/. ! -name . -prune \ - ! -name '*.lock' -type f -exec rm -f {} + || exit 0 +find "$cache_root"/. ! -name . -prune ! -name '*.lock' -type f -exec rm -f {} + || exit 0 -- cgit v2.8.0