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

[PATCH v2 2/2] version-gen: avoid messing the version

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Sep 13, 2013, 01:17 UTC
Message-ID
<1379035046-6688-3-git-send-email-felipe.contreras@gmail.com>
In-Reply-To
<1379035046-6688-1-git-send-email-felipe.contreras@gmail.com>

If the version is 'v1.8.4-rc1' that is the version, and there's no need to change it to anything else, like 'v1.8.4.rc1'.

If RedHat, or somebody else, needs a specific version, they can use the 'version' file, like everybody else.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 GIT-VERSION-GEN | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN
index e96538d..b3de2db 100755
--- a/GIT-VERSION-GEN
+++ b/GIT-VERSION-GEN
@@ -26,10 +26,8 @@ describe () {
 if test -f version
 then
 	VN=$(cat version) || VN="$DEF_VER"
-elif test -d ${GIT_DIR:-.git} -o -f .git && describe
+elif test ! -d ${GIT_DIR:-.git} -o ! -f .git || ! describe
 then
-	VN=$(echo "$VN" | sed -e 's/-/./g')
-else
 	VN="$DEF_VER"
 fi
 
-- 
1.8.4-338-gefd7fa6
Previous: Felipe ContrerasNext: Junio C Hamano
Message 5 of 7 in “version-gen: fixes and cleanups”
  1. 0/2 version-gen: fixes and cleanupsFelipe Contreras, Sep 13, 2013
  2. 1/2 version-gen: cleanupFelipe Contreras, Sep 13, 2013
  3. Junio C HamanoSep 13, 2013
  4. Felipe ContrerasSep 13, 2013
  5. 2/2 version-gen: avoid messing the versionFelipe Contreras, Sep 13, 2013
  6. Junio C HamanoSep 13, 2013
  7. Felipe ContrerasSep 14, 2013

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.