Pick a tag if multiple tags exist on a SHA.

Fixes #2311
This commit is contained in:
Matt Layman 2022-03-30 01:08:52 -04:00 committed by Anthony Sottile
parent a522507020
commit e8b46c1b16
3 changed files with 36 additions and 0 deletions

View file

@ -59,6 +59,9 @@ class RevInfo(NamedTuple):
except CalledProcessError:
cmd = (*git_cmd, 'rev-parse', 'FETCH_HEAD')
rev = cmd_output(*cmd, cwd=tmp)[1].strip()
else:
if tags_only:
rev = git.get_best_candidate_tag(rev, tmp)
frozen = None
if freeze: