Thread (1 message) 1 message, 1 author, 2016-06-15
DORMANTno replies

[PATCH 3/3] GIT-VERSION-GEN: style nitpicks

From: Mathias Lafeldt <hidden>
Date: 2016-06-15 22:49:51
Subsystem: the rest · Maintainer: Linus Torvalds

- remove superfluous semicolon
- simplify version comparison
- remove empty lines at end of file

Signed-off-by: Mathias Lafeldt <redacted>
---
 GIT-VERSION-GEN |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index 427d5d6..60bef5a 100755
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
@@ -18,7 +18,7 @@ elif test -d .git -o -f .git &&
 	v[0-9]*) : ;;
 	esac
 then
-	VN=$(echo "$VN" | sed -e 's/-/./g');
+	VN=$(echo "$VN" | sed -e 's/-/./g')
 else
 	VN="$DEF_VER"
 fi
@@ -31,9 +31,9 @@ then
 else
 	VC=unset
 fi
-test "$VN" = "$VC" || {
+
+if test "$VN" != "$VC"
+then
 	echo >&2 "GIT_VERSION = $VN"
 	echo "GIT_VERSION = $VN" >$GVF
-}
-
-
+fi
-- 
1.7.3.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help