So I am working on a system to determine the changes since the last tag.
Git offers the git describe --tag command which will:
The command finds the most recent tag that is reachable from a commit.
https://git-scm.com/docs/git-describe
However, I am using Libgit2sharp to do some automation and I am looking for the equivalent functionality however I am not having much luck.
I tried:
var result = repo.Refs.ReachableFrom(
repo.Refs.Where(r => r.IsTag),
new[] { repo.Head.Tip });
But this didn't yield any results (I am pretty use I am doing it wrong)