diff options
author | Case Duckworth | 2023-05-28 22:14:04 -0500 |
---|---|---|
committer | Case Duckworth | 2023-05-28 22:14:04 -0500 |
commit | 75a4fcbb3e220c2154044d966d5f8de2eeb96014 (patch) | |
tree | 02c90acc4dee3822f560d88d62c66b5d0d67802a /post-update.hook | |
download | git-init-remote-75a4fcbb3e220c2154044d966d5f8de2eeb96014.tar.gz git-init-remote-75a4fcbb3e220c2154044d966d5f8de2eeb96014.zip |
Initial commit
Diffstat (limited to 'post-update.hook')
-rwxr-xr-x | post-update.hook | 15 |
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 | |||
6 | agefile="$(git rev-parse --git-dir)/info/web/last-modified" | ||
7 | mkdir -p "$(dirname "$agefile")" | ||
8 | |||
9 | git 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 | |||
15 | git update-server-info | ||