summaryrefslogtreecommitdiff
path: root/cgit/contrib
diff options
context:
space:
mode:
authorMehmet Samet Duman <yongdohyun@projecttick.org>2026-04-02 18:41:43 +0300
committerMehmet Samet Duman <yongdohyun@projecttick.org>2026-04-02 18:41:43 +0300
commit6bf7c5ce92ff6237c0b17c332873805018812b40 (patch)
tree18905aaed6af4be08f686f18aac1660f9606628d /cgit/contrib
parentc93af47179aad2d3fae3bc756d058f3ff1a14ccf (diff)
parente94c3cd8bda6f9c2a6d0a613733c6eeddd1a406f (diff)
downloadProject-Tick-6bf7c5ce92ff6237c0b17c332873805018812b40.tar.gz
Project-Tick-6bf7c5ce92ff6237c0b17c332873805018812b40.zip
Add 'cgit/' from commit 'e94c3cd8bda6f9c2a6d0a613733c6eeddd1a406f'
git-subtree-dir: cgit git-subtree-mainline: c93af47179aad2d3fae3bc756d058f3ff1a14ccf git-subtree-split: e94c3cd8bda6f9c2a6d0a613733c6eeddd1a406f
Diffstat (limited to 'cgit/contrib')
-rwxr-xr-xcgit/contrib/hooks/post-receive.agefile19
1 files changed, 19 insertions, 0 deletions
diff --git a/cgit/contrib/hooks/post-receive.agefile b/cgit/contrib/hooks/post-receive.agefile
new file mode 100755
index 0000000000..2f72ae9c0d
--- /dev/null
+++ b/cgit/contrib/hooks/post-receive.agefile
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+# An example hook to update the "agefile" for CGit's idle time calculation.
+#
+# This hook assumes that you are using the default agefile location of
+# "info/web/last-modified". If you change the value in your cgitrc then you
+# must also change it here.
+#
+# To install the hook, copy (or link) it to the file "hooks/post-receive" in
+# each of your repositories.
+#
+
+agefile="$(git rev-parse --git-dir)"/info/web/last-modified
+
+mkdir -p "$(dirname "$agefile")" &&
+git for-each-ref \
+ --sort=-authordate --count=1 \
+ --format='%(authordate:iso8601)' \
+ >"$agefile"