2 # Copyright (c) 2008 David Soria Parra <dsp at php dot net>
4 # Licensed under the terms of the MIT License
5 # See /usr/share/doc/gcutils/copyright
6 # or http://www.opensource.org/licenses/mit-license.php
20 git
--version > /dev
/null
24 die
"Git not found. It's either not installed or not in \$PATH"
27 version
=`git --version | grep -o -E "[12]\.([5]\.([0-9]{2,}|[3-9]+)|[6-9]\.[0-9]+)"`
30 die
"Wrong git version. $prog needs git 1.5.3 or higher, but "`git --version`" found."
36 echo "$PROGNAME: "`basename $0`-$VERSION
41 gitdir
=`git rev-parse --git-dir 2> /dev/null`
42 test "$gitdir" = "" && die
"Please use this command from a git working tree."