From: Yves Orton Date: Sun, 21 Dec 2008 18:40:18 +0000 (+0100) Subject: slightly smarter make_patchnum logic, detect if there are changes to the working... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=10275c29786c111a7eacbb751ea7e0ba257dc869;p=p5sagit%2Fp5-mst-13.2.git slightly smarter make_patchnum logic, detect if there are changes to the working directory so we dont lie about our version --- diff --git a/make_patchnum.sh b/make_patchnum.sh index d3c9441..2746840 100644 --- a/make_patchnum.sh +++ b/make_patchnum.sh @@ -4,7 +4,12 @@ Existing=`cat .patchnum 2>/dev/null` if [ -e ".patch" ]; then Current=`awk '{print $4}' .patch` else + # we should do something better here Current=`git describe` + Changed=`git diff-index --name-only HEAD` + if [ -n "$Changed" ]; then + Current="$Current-with-uncommitted-changes" + fi fi if [ "$Existing" != "$Current" ]; then