From 96ef3680b29832958713133dc8de9d579bc88882 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Wed, 27 Mar 2013 09:24:33 +0100 Subject: [PATCH] proper error exit on no revision found --- git-identify-revision | 4 ++++ 1 file changed, 4 insertions(+) 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 -- 2.39.2