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

[StGit PATCH 2/2] Always resolve "git describe" to something

From
Samuel Tardieu <sam@rfc1149.net>
Date
Oct 9, 2008, 09:02 UTC
Message-ID
<20081009090202.12637.2907.stgit@arrakis.enst.fr>
In-Reply-To
<20081009090157.12637.45887.stgit@arrakis.enst.fr>
Sometimes, "git describe" cannot describe the current version. Use
"--always" so that we have a fallback.
---
 stgit/version.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/stgit/version.py b/stgit/version.py
index d57053d..05fa8e9 100644
--- a/stgit/version.py
+++ b/stgit/version.py
@@ -8,7 +8,7 @@ class VersionUnavailable(StgException):
 def git_describe_version():
     path = sys.path[0]
     try:
-        v = run.Run('git', 'describe', '--tags', '--abbrev=4'
+        v = run.Run('git', 'describe', '--tags', '--abbrev=4', '--always'
                     ).cwd(path).output_one_line()
     except run.RunException, e:
         raise VersionUnavailable(str(e))
Previous: Samuel Tardieu
Message 2 of 2 in “Handle "git diff-tree --stdin" error”
  1. 1/2 Handle "git diff-tree --stdin" errorSamuel Tardieu, Oct 9, 2008
  2. 2/2 Always resolve "git describe" to somethingSamuel Tardieu, Oct 9, 2008

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.