summary refs log tree commit diff stats
path: root/post-update.hook
diff options
context:
space:
mode:
authorCase Duckworth2023-05-28 22:14:04 -0500
committerCase Duckworth2023-05-28 22:14:04 -0500
commit75a4fcbb3e220c2154044d966d5f8de2eeb96014 (patch)
tree02c90acc4dee3822f560d88d62c66b5d0d67802a /post-update.hook
downloadgit-init-remote-75a4fcbb3e220c2154044d966d5f8de2eeb96014.tar.gz
git-init-remote-75a4fcbb3e220c2154044d966d5f8de2eeb96014.zip
Initial commit
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