summary refs log tree commit diff stats
path: root/post-update.hook
diff options
context:
space:
mode:
Diffstat (limited to 'post-update.hook')
-rwxr-xr-xpost-update.hook15
1 files changed, 15 insertions, 0 deletions
diff --git a/post-update.hook b/post-update.hook new file mode 100755 index 0000000..a68bf65 --- /dev/null +++ b/post-update.hook
@@ -0,0 +1,15 @@
1#!/bin/sh
2
3# Update "agefile" for cgit
4# The default location is <git-dir>/info/web/last-modified
5
6agefile="$(git rev-parse --git-dir)/info/web/last-modified"
7mkdir -p "$(dirname "$agefile")"
8
9git for-each-ref > "$agefile" \
10 --sort=-authordate --count=1 \
11 --format='%(authordate:iso8601)'
12
13# Prepare a packed repository for use over dumb transports
14
15git update-server-info