git revision tagging

Nick Schermer nickschermer at gmail.com
Mon Aug 17 11:12:05 CEST 2009


2009/8/17 Brian J. Tarricone <brian at tarricone.org>:
> if [ -d .git ]; then
>  revision=$(git rev-parse HEAD | cut -c1-8)

Please use

if [ -d .git ]; then
 revision=$(git rev-parse --short HEAD 2>/dev/null).
fi
if [ -z "$revision" ]; then
 revision="Unknown"
fi

Nick



More information about the Xfce4-dev mailing list