git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Mathias Lafeldt <misfire@debugon.org>
Date
Oct 22, 2010, 11:24 UTC
Message-ID
<4CC1746D.5070907@debugon.org>
In-Reply-To
<cover.1287746107.git.misfire@debugon.org>
- remove superfluous semicolon
- simplify version comparison
- remove empty lines at end of file
Signed-off-by: Mathias Lafeldt <misfire@debugon.org>
---
 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
Previous: Mathias Lafeldt
Message 7 of 7 in “GIT-VERSION-GEN: make use of git describe --dirty”
  1. 1/3 GIT-VERSION-GEN: make use of git describe --dirtyMathias Lafeldt, Oct 22, 2010
  2. Jonathan NiederOct 22, 2010
  3. Mathias LafeldtOct 23, 2010
  4. Mathias LafeldtOct 27, 2010
  5. Jakub NarebskiOct 27, 2010
  6. 2/3 GIT-VERSION-GEN: tweak processing of version fileMathias Lafeldt, Oct 22, 2010
  7. 3/3 GIT-VERSION-GEN: style nitpicksMathias Lafeldt, Oct 22, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.