-
Notifications
You must be signed in to change notification settings - Fork 654
Various minor enhancements #36
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
Conversation
IRepository.Tags doesn't enforce the order of the returned tags. Indeed, the order depends on the way the OS and (the underlying storage system) return entries in a directory.
FWIW, there are actually two other similar calls to
I haven't updated them because I'm not sure to understand the underlying expectations. Provided there's only one tag in the repo named |
A commit is said to be a "merge commit" if it bears more than one parent commit.
Looks good to me, @SimonCropp? Sent from my iPhone
|
I think this is actually incorrect. Or more specifically less correct. The intent of the previous code was to retrieve the newest tag, not the tag with the highest version. So if someone pushes a new tag we use that over the other ones despite the version. Admittedly it is unlikely that someone would push a smaller version tag to the same commit so most of the time the highest version would be correct. However i added this extension method to find the newest tag https://github.com/Particular/GitFlowVersion/blob/master/GitFlowVersion/LibGitExtensions.cs#L38 does this look ok to you? |
@SimonCropp Thanks for the merge! BTW, next time I'm not in line with your expectations, please let me just know and I'll update the PR accordingly. It'll avoid you wasting time over my mistakes/misunderstandings 😉
Looks fine to me. I think there might be a tiny corner case. I'll send a PR about it if I can come up with a failing test. |
I would have but i pushed the shinny green merge button before i realized. and i was my poor code that caused the confusion. |
Those commits come from #32. I've opened a separate PR as they should be ready to be reviewed
Most notable change lies in
NewestSemVerTag()
. Indeed, LibGit2Sharp doesn't enforce Tags (nor any References) to be returned in a sorted order.As such, the call to
Reverse()
has been removed and the selection of the highest version to be returned has been delegated toSemanticVersion
.In order to ease the review of the commit diff, indentation fixes have been pushed in a separate commit.