No functional changes.

Signed-off-by: Felipe Contreras <felipe.contre...@gmail.com>
---
 GIT-VERSION-GEN | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index 06026ea..b0db139 100755
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
@@ -7,21 +7,24 @@ LF='
 '
 
 # First see if there is a version file (included in release tarballs),
-# then try git-describe, then default.
+# then try 'git describe', then default.
 if test -f version
 then
        VN=$(cat version) || VN="$DEF_VER"
 elif test -d ${GIT_DIR:-.git} -o -f .git &&
-       VN=$(git describe --match "v[0-9]*" --abbrev=7 HEAD 2>/dev/null) &&
+       VN=$(git describe --match "v[0-9]*" --abbrev=7 HEAD 2>/dev/null)
+then
        case "$VN" in
-       *$LF*) (exit 1) ;;
+       *$LF*)
+               exit 1
+               ;;
        v[0-9]*)
                git update-index -q --refresh
                test -z "$(git diff-index --name-only HEAD --)" ||
-               VN="$VN-dirty" ;;
+               VN="$VN-dirty"
+               ;;
        esac
-then
-       VN=$(echo "$VN" | sed -e 's/-/./g');
+       VN=$(echo "$VN" | sed -e 's/-/./g')
 else
        VN="$DEF_VER"
 fi
@@ -34,9 +37,6 @@ then
 else
        VC=unset
 fi
-test "$VN" = "$VC" || {
-       echo >&2 "GIT_VERSION = $VN"
-       echo "GIT_VERSION = $VN" >$GVF
-}
-
-
+test "$VN" = "$VC" && exit
+echo >&2 "GIT_VERSION = $VN"
+echo "GIT_VERSION = $VN" >$GVF
-- 
1.8.4-338-gefd7fa6

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to