1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#!/bin/sh
# Copyright 2011 Brent Longborough
# Please read gitinfo.pdf for licencing and other details
# -----------------------------------------------------
# Post-{commit,checkout,merge} hook for the gitinfo package
#
prefixes=". test docs" # Example for multiple gitHeadInfo.tex files
prefixes="." # Default --- in the working copy root
for pref in $prefixes
do
git log -1 --date=short \
--pretty=format:"\usepackage[%
shash={%h},
lhash={%H},
authname={%an},
authemail={%ae},
authsdate={%ad},
authidate={%ai},
authudate={%at},
commname={%an},
commemail={%ae},
commsdate={%ad},
commidate={%ai},
commudate={%at},
refnames={%d}
]{gitsetinfo}" HEAD > $pref/gitHeadInfo.gin
done
|