Skip to content

Commit 4d6f532

Browse files
committed
Just remove the redundant code
1 parent b5ac6eb commit 4d6f532

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

src/GitVersionCore/VersionCalculation/BaseVersionCalculators/TaggedCommitVersionStrategy.cs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,7 @@ public override IEnumerable<BaseVersion> GetVersions(GitVersionContext context)
3232
.Where(a => a != null)
3333
.ToList();
3434

35-
if (tagsOnBranch.Count == 0)
36-
{
37-
yield break;
38-
}
39-
if (tagsOnBranch.Count == 1)
40-
{
41-
yield return CreateBaseVersion(context, tagsOnBranch[0]);
42-
}
43-
44-
foreach (var result in tagsOnBranch.Select(t => CreateBaseVersion(context, t)))
45-
{
46-
yield return result;
47-
}
35+
return tagsOnBranch.Select(t => CreateBaseVersion(context, t));
4836
}
4937

5038
BaseVersion CreateBaseVersion(GitVersionContext context, VersionTaggedCommit version)

0 commit comments

Comments
 (0)