From: Rudolf Polzer Date: Wed, 27 Mar 2013 08:24:33 +0000 (+0100) Subject: proper error exit on no revision found X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=96ef3680b29832958713133dc8de9d579bc88882;p=xonotic%2Fdiv0-gittools.git proper error exit on no revision found --- diff --git a/git-identify-revision b/git-identify-revision index c303913..b1abf9c 100755 --- a/git-identify-revision +++ b/git-identify-revision @@ -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