slightly smarter make_patchnum logic, detect if there are changes to the working...
Yves Orton [Sun, 21 Dec 2008 18:40:18 +0000 (19:40 +0100)]
make_patchnum.sh

index d3c9441..2746840 100644 (file)
@@ -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