aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2023-04-11 12:31:54 -0400
committerXavier Claessens <xclaesse@gmail.com>2023-06-01 15:44:46 -0400
commit1a9f20d44a3c88882e5744d6179926f3f179cc8d (patch)
treec1e343e1b23e231a290ae4fb12990ed2a1dbab62 /mesonbuild
parent7ac6afe265510cee133110f2d6d6ed111ccf0f1e (diff)
downloadmeson-1a9f20d44a3c88882e5744d6179926f3f179cc8d.zip
meson-1a9f20d44a3c88882e5744d6179926f3f179cc8d.tar.gz
meson-1a9f20d44a3c88882e5744d6179926f3f179cc8d.tar.bz2
vcs_tag: Add --always to git describe
This fallbacks to short commit id in case the git repository does not contain any annotated tag, for example before the first release of a project.
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/utils/universal.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/utils/universal.py b/mesonbuild/utils/universal.py
index 956b150..79c60c4 100644
--- a/mesonbuild/utils/universal.py
+++ b/mesonbuild/utils/universal.py
@@ -754,7 +754,7 @@ def detect_vcs(source_dir: T.Union[str, Path]) -> T.Optional[T.Dict[str, str]]:
'name': 'git',
'cmd': 'git',
'repo_dir': '.git',
- 'get_rev': 'git describe --dirty=+',
+ 'get_rev': 'git describe --dirty=+ --always',
'rev_regex': '(.*)',
'dep': '.git/logs/HEAD'
},