]> de.git.xonotic.org Git - xonotic/div0-gittools.git/blobdiff - git-identify-revision
oops, it's index, not work tree, here
[xonotic/div0-gittools.git] / git-identify-revision
index c30391309cb88699dbc426548f95d0c9fb634d40..21b56a0acf0610a8358eb58badf5da0a3fce1e65 100755 (executable)
@@ -13,7 +13,7 @@ usage()
        echo "closest match."
        echo
        echo "Example: $0 --cached v1.0..HEAD"
        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."
 }
 
        echo "and identifies the closest match."
 }
 
@@ -68,5 +68,9 @@ for rev in $allrevs; do
 done
 echo >&2 "Done."
 
 done
 echo >&2 "Done."
 
+if [ -z "$bestrevscore" ]; then
+       exit 1
+fi
+
 echo "$bestrev"
 git diff $diffopts --cached "$bestrev" >&2
 echo "$bestrev"
 git diff $diffopts --cached "$bestrev" >&2