Skip to content

Pick a tag if multiple tags exist on a SHA. - #2312

Merged
asottile merged 1 commit into
pre-commit:mainfrom
mblayman:multiple-tags
Mar 31, 2022
Merged

Pick a tag if multiple tags exist on a SHA.#2312
asottile merged 1 commit into
pre-commit:mainfrom
mblayman:multiple-tags

Conversation

@mblayman

Copy link
Copy Markdown
Contributor

This PR uses git tag --points-at to check if multiple tags exist for a given tag. If so, it tries to pick the "best" one that looks like a version tag.

Fixes #2311

Comment thread pre_commit/commands/autoupdate.py Outdated
Comment thread pre_commit/commands/autoupdate.py Outdated

@asottile asottile left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, a few small things I missed in first pass review from my phone 🙃

Comment thread pre_commit/commands/autoupdate.py
Comment thread pre_commit/commands/autoupdate.py Outdated
Comment thread pre_commit/commands/autoupdate.py Outdated

@asottile asottile left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@asottile
asottile merged commit b97bb18 into pre-commit:main Mar 31, 2022
@mblayman
mblayman deleted the multiple-tags branch March 31, 2022 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

tags_only autoupdate picks first (alphabetical?) tag when multiple on SHA

2 participants