summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkj_sh6042026-05-04 23:44:14 -0400
committerkj_sh6042026-05-04 23:44:14 -0400
commitaff31c1f962799b1c11de5403fd87b7e407bf419 (patch)
tree6999ca0d2a9db4afd49a0f82e352ebd5ed284538
parentd6018bcd0f281c64be5b5ab8922ddc231c5e9387 (diff)
refactor: just add the post-receive example here
-rw-r--r--post-receive9
1 files changed, 9 insertions, 0 deletions
diff --git a/post-receive b/post-receive
new file mode 100644
index 0000000..3a3e262
--- /dev/null
+++ b/post-receive
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+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"