summary refs log tree commit diff stats
path: root/post-update.hook
blob: a68bf654c34ba27441d11b8c2e4ccd5ad5670ecf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

# Update "agefile" for cgit
# The default location is <git-dir>/info/web/last-modified

agefile="$(git rev-parse --git-dir)/info/web/last-modified"
mkdir -p "$(dirname "$agefile")"

git for-each-ref > "$agefile" \
	--sort=-authordate --count=1 \
	--format='%(authordate:iso8601)'

# Prepare a packed repository for use over dumb transports

git update-server-info