-
-
Save apoelstra/0813427350c169a7536b to your computer and use it in GitHub Desktop.
post-checkout post-commit post-merge post-rewrite
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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="." # 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So as to not pollute the IRC stream.. What is the 101 of implementing the above?