Skip to content

Commit 9dcfc30

Browse files
committed
Integrate code review findings
1 parent d4ce0b6 commit 9dcfc30

File tree

5 files changed

+5
-6
lines changed

5 files changed

+5
-6
lines changed

src/GitVersion.Core/Git/VersionFieldExtensions.cs renamed to src/GitVersion.Core/Extensions/VersionFieldExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace GitVersion;
1+
namespace GitVersion.Extensions;
22

33
internal static class VersionFieldExtensions
44
{

src/GitVersion.Core/Git/ICommit.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ namespace GitVersion;
22

33
public interface ICommit : IEquatable<ICommit?>, IComparable<ICommit>, IGitObject
44
{
5-
public bool IsMergeCommit => Parents.Count() >= 2;
6-
5+
bool IsMergeCommit => Parents.Count() >= 2;
76
IEnumerable<ICommit> Parents { get; }
87
DateTimeOffset When { get; }
98
string Message { get; }

src/GitVersion.Core/MergeMessage.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ private ReferenceName GetMergedBranchName(string mergedBranch)
9696
}
9797

9898
public static bool TryParse(
99-
[NotNullWhen(true)] out MergeMessage? mergeMessage, ICommit mergeCommit, IGitVersionConfiguration configuration)
99+
ICommit mergeCommit, IGitVersionConfiguration configuration, [NotNullWhen(true)] out MergeMessage? mergeMessage)
100100
{
101101
mergeCommit.NotNull();
102102
configuration.NotNull();

src/GitVersion.Core/PublicAPI.Unshipped.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,7 @@ static GitVersion.Logging.LogExtensions.Warning(this GitVersion.Logging.ILog! lo
855855
static GitVersion.Logging.LogExtensions.Warning(this GitVersion.Logging.ILog! log, GitVersion.Logging.Verbosity verbosity, string! format, params object![]! args) -> void
856856
static GitVersion.Logging.LogExtensions.Warning(this GitVersion.Logging.ILog! log, string! format, params object![]! args) -> void
857857
static GitVersion.Logging.LogExtensions.Write(this GitVersion.Logging.ILog! log, GitVersion.Logging.LogLevel level, string! format, params object![]! args) -> void
858-
static GitVersion.MergeMessage.TryParse(out GitVersion.MergeMessage? mergeMessage, GitVersion.ICommit! mergeCommit, GitVersion.Configuration.IGitVersionConfiguration! configuration) -> bool
858+
static GitVersion.MergeMessage.TryParse(GitVersion.ICommit! mergeCommit, GitVersion.Configuration.IGitVersionConfiguration! configuration, out GitVersion.MergeMessage? mergeMessage) -> bool
859859
static GitVersion.ReferenceName.FromBranchName(string! branchName) -> GitVersion.ReferenceName!
860860
static GitVersion.ReferenceName.Parse(string! canonicalName) -> GitVersion.ReferenceName!
861861
static GitVersion.ReferenceName.TryParse(out GitVersion.ReferenceName? value, string! canonicalName) -> bool

src/GitVersion.Core/SemVer/SemanticVersion.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public class SemanticVersion : IFormattable, IComparable<SemanticVersion>, IEqua
3333
public bool IsLabeledWith(string value) => PreReleaseTag.HasTag() && PreReleaseTag.Name.IsEquivalentTo(value);
3434

3535
public bool IsMatchForBranchSpecificLabel(string? value)
36-
=> (PreReleaseTag.Name == string.Empty && PreReleaseTag.Number is null) || value is null || IsLabeledWith(value);
36+
=> (PreReleaseTag.Name.Length == 0 && PreReleaseTag.Number is null) || value is null || IsLabeledWith(value);
3737

3838
public SemanticVersion(long major = 0, long minor = 0, long patch = 0)
3939
{

0 commit comments

Comments
 (0)