quick exit on exact match
authorRudolf Polzer <divverent@xonotic.org>
Wed, 27 Mar 2013 08:18:47 +0000 (09:18 +0100)
committerRudolf Polzer <divverent@xonotic.org>
Wed, 27 Mar 2013 08:18:47 +0000 (09:18 +0100)
git-identify-revision

index e71c259..c303913 100755 (executable)
@@ -61,6 +61,9 @@ for rev in $allrevs; do
                echo >&2 "Improved to $rev (score: $score)"
                bestrev=$rev
                bestrevscore=$score
+               if [ $score -eq 0 ]; then
+                       break
+               fi
        fi
 done
 echo >&2 "Done."