diff options
Diffstat (limited to 'custom/hooks/post-receive.cgit-cache')
| -rwxr-xr-x | custom/hooks/post-receive.cgit-cache | 3 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 1 insertion, 2 deletions
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 |
