Fixup: Wrong assumption, wrong calculation.

This commit is contained in:
2021-05-11 09:55:21 +01:00
parent cdedb59476
commit 6507c43648
2 changed files with 5 additions and 3 deletions
+3 -1
View File
@@ -152,8 +152,10 @@ func (s *Setup) ListCommits() ([]CommitDetails, error) {
}
for commitId, cmt := range tmpResults {
if zero.IsZero(s.Force.Commit) || (!zero.IsZero(s.Force.Commit) && cmt.Hash == s.Force.Commit) {
if s.Force.Commit != "" && cmt.Hash == s.Force.Commit {
s.Commits = tmpResults[commitId:]
} else {
s.Commits = tmpResults
}
}
+2 -2
View File
@@ -337,7 +337,7 @@ func (suite *Tests) TestSetup_CalculateSemver() {
},
wantSemver: wantSemver{
Major: 1,
Minor: 2,
Minor: 3,
Patch: 1,
},
},
@@ -351,7 +351,7 @@ func (suite *Tests) TestSetup_CalculateSemver() {
},
wantSemver: wantSemver{
Major: 1,
Minor: 2,
Minor: 3,
Patch: 1,
},
},