oops, it's index, not work tree, here
[xonotic/div0-gittools.git] / git-identify-revision
index c303913..21b56a0 100755 (executable)
@@ -13,7 +13,7 @@ usage()
        echo "closest match."
        echo
        echo "Example: $0 --cached v1.0..HEAD"
-       echo "Compares current work tree to all revisions between v1.0 and HEAD,"
+       echo "Compares current index to all revisions between v1.0 and HEAD,"
        echo "and identifies the closest match."
 }
 
@@ -68,5 +68,9 @@ for rev in $allrevs; do
 done
 echo >&2 "Done."
 
+if [ -z "$bestrevscore" ]; then
+       exit 1
+fi
+
 echo "$bestrev"
 git diff $diffopts --cached "$bestrev" >&2