Skip to content

feat: add first debug version of gix tag list #2073

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 6, 2025

Conversation

cruessler
Copy link
Contributor

@cruessler cruessler commented Jul 2, 2025

This PR adds a new command: gix tag list.

gix tag list outputs a list of tags, adding information with respect to whether a tag is lightweight or annotated (the examples are taken from the gitoxide repository):

  • for a lightweight tag, it will show the name it has in .git/refs/tags/: v0.8.4.
  • for an annotated tag where the name is identical to the filename in .git/refs/tags/, it will show an asterisk next to the name: gix-v0.72.1 *.
  • for an annotated tag where the name is not identical to the filename in .git/refs/tags/, it will show the tag name in square brackets: gitoxide-v0.8.1 [tag name: v0.8.1].

Feel free to modify this in any way you like, though, in particular if there are already established patterns in other parts of the codebase.

@cruessler cruessler marked this pull request as ready for review July 6, 2025 10:38
- add alias
- support `tags` as alias, invoked without explicit `list`
- always put annotated tag information into `[]`, despite being more noisy.
Copy link
Member

@Byron Byron left a comment

Choose a reason for hiding this comment

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

Thanks a lot, this looks like a great start!

I have made some adjustments to make gix tags possible as well.

And finally, a suggestion for a rainy day: I'd love it if by default it could produce the same order as git tag --sort='version:refname', effectively making it semver aware.
If that was present, it could be my standard way of obtaining tag information in future, as this is what I typically need but can never remember.

@Byron Byron enabled auto-merge July 6, 2025 14:24
@Byron Byron merged commit c7af04d into GitoxideLabs:main Jul 6, 2025
23 checks passed
@EliahKagan
Copy link
Member

And finally, a suggestion for a rainy day: I'd love it if by default it could produce the same order as git tag --sort='version:refname', effectively making it semver aware.

Is this to say that it the versionsort.suffix configuration variable should be recognized as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants