8000 finding nearest tag of a commit · libgit2 libgit2 · Discussion #5589 · GitHub
[go: up one dir, main page]

Skip to content

finding nearest tag of a commit #5589

Answered by mainrs
mainrs asked this question in General
Jul 31, 2020 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

I figured it out. Maybe it's just me but I find the documentation of libgit2 super hard to read. With no prior knowledge of how exactly git works under the hood and what mechanisms can be used to achieve certain things, it takes a relatively long time to figure stuff out :)

I could luckily modify my problem domain. I now had to just get a list of all commits between HEAD and the latest git tag. This can be done fairly easily without any tricks. It's worth noting though that the latest git tag does not always mean the latest version. People often enough re-tag old releases and those tags are newer but might point to an older version of the software. So I parsed the version strings manually…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ltt-stripe
Comment options

@mainrs
Comment options

Answer selected by mainrs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
0