-
Hey! I need to find the closest tag for a given commit:
Given the commit hash Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I figured it out. Maybe it's just me but I find the documentation of I could luckily modify my problem domain. I now had to just get a list of all commits between Edit: For further readers, I've used the Rust library git2 and not |
Beta Was this translation helpful? Give feedback.
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 exactlygit
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…