Skip to content

Instantly share code, notes, and snippets.

@apoelstra
Created November 10, 2014 13:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save apoelstra/0813427350c169a7536b to your computer and use it in GitHub Desktop.
Save apoelstra/0813427350c169a7536b to your computer and use it in GitHub Desktop.
post-checkout post-commit post-merge post-rewrite
#!/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
@webdeli
Copy link

webdeli commented Nov 10, 2014

So as to not pollute the IRC stream.. What is the 101 of implementing the above?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment