[StGit PATCH 2/2] Always resolve "git describe" to something
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))