-
Notifications
You must be signed in to change notification settings - Fork 654
[5.0.0] mainline fails when a single commit #1768
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
Comments
This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. Thank you for your contributions. |
Hi, @JonCubed and sorry for the lack of response leading to your issue being closed by stalebot. We would love a PR that fixes this problem, alongside a |
This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. Thank you for your contributions. |
Is this still a problem in 5.2.4? |
#2318 may help alleviate the exception here and give you the fallback strategy. |
This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. Thank you for your contributions. |
I've come across this problem quite often for new repos and finally looked into it. When I run GitVersion on a new repo where it uses mainline calculation, GitVersion will crash with an exception
I've trace this back to the following if block with ln223 being the culprit.
mergeBase
is the current commit andmainlineCommitLog
is an empty list but it expects that there are parents commits however it is the first so there are not.GitVersion/src/GitVersionCore/VersionCalculation/MainlineVersionCalculator.cs
Lines 220 to 231 in 11ee72a
This can be fixed if the
if
statement is adjusted to the followingI am uncertain if this is an acceptable fix, but if it is I am happy to make a pr for it
The text was updated successfully, but these errors were encountered: