diff options
author | Karl Berry <karl@freefriends.org> | 2014-09-07 01:51:10 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-09-07 01:51:10 +0000 |
commit | ff0be2556ec1f7fbde7f75caeed672f326246d37 (patch) | |
tree | 27bdaf756663383af2ea5c8b1b378f771de2db5a /Master/texmf-dist/doc/latex/gitinfo2/post-xxx-sample.txt | |
parent | 9d74b45adff88c5e53d6845f22e46dfcd2242fd2 (diff) |
gitinfo2 (6sep14)
git-svn-id: svn://tug.org/texlive/trunk@35123 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/gitinfo2/post-xxx-sample.txt')
-rw-r--r-- | Master/texmf-dist/doc/latex/gitinfo2/post-xxx-sample.txt | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/gitinfo2/post-xxx-sample.txt b/Master/texmf-dist/doc/latex/gitinfo2/post-xxx-sample.txt new file mode 100644 index 00000000000..76e6a263454 --- /dev/null +++ b/Master/texmf-dist/doc/latex/gitinfo2/post-xxx-sample.txt @@ -0,0 +1,30 @@ +#!/bin/sh +# Copyright 2014 Brent Longborough +# Part of gitinfo2 package Version 2 +# Please read gitinfo2.pdf for licencing and other details +# ----------------------------------------------------- +# Post-{commit,checkout,merge} hook for the gitinfo2 package +# +# Get the first tag found in the history from the current HEAD +FIRSTTAG=$(git describe --tags --dirty='-*' 2>/dev/null) +# Get the first tag in history that looks like a Release +RELTAG=$(git describe --tags --long --dirty='-*' --match '[0-9]*.*' 2>/dev/null) +# Hoover up the metadata +git --no-pager 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}, + firsttagdescribe={$FIRSTTAG}, + reltag={$RELTAG} + ]{gitexinfo}" HEAD > .git/gitHeadInfo.gin |