Skip to content

Commit

Permalink
Integrate code review remarks
Browse files Browse the repository at this point in the history
  • Loading branch information
HHobeck committed Dec 18, 2023
1 parent 37e3dc1 commit 51558de
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace GitVersion;
namespace GitVersion.Extensions;

internal static class VersionFieldExtensions
{
Expand Down
3 changes: 1 addition & 2 deletions src/GitVersion.Core/Git/ICommit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ namespace GitVersion;

public interface ICommit : IEquatable<ICommit?>, IComparable<ICommit>, IGitObject
{
public bool IsMergeCommit => Parents.Count() >= 2;

bool IsMergeCommit => Parents.Count() >= 2;
IEnumerable<ICommit> Parents { get; }
DateTimeOffset When { get; }
string Message { get; }
Expand Down
2 changes: 1 addition & 1 deletion src/GitVersion.Core/MergeMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ private ReferenceName GetMergedBranchName(string mergedBranch)
}

public static bool TryParse(
[NotNullWhen(true)] out MergeMessage? mergeMessage, ICommit mergeCommit, IGitVersionConfiguration configuration)
ICommit mergeCommit, IGitVersionConfiguration configuration, [NotNullWhen(true)] out MergeMessage? mergeMessage)
{
mergeCommit.NotNull();
configuration.NotNull();
Expand Down
2 changes: 1 addition & 1 deletion src/GitVersion.Core/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ static GitVersion.Logging.LogExtensions.Warning(this GitVersion.Logging.ILog! lo
static GitVersion.Logging.LogExtensions.Warning(this GitVersion.Logging.ILog! log, GitVersion.Logging.Verbosity verbosity, string! format, params object![]! args) -> void
static GitVersion.Logging.LogExtensions.Warning(this GitVersion.Logging.ILog! log, string! format, params object![]! args) -> void
static GitVersion.Logging.LogExtensions.Write(this GitVersion.Logging.ILog! log, GitVersion.Logging.LogLevel level, string! format, params object![]! args) -> void
static GitVersion.MergeMessage.TryParse(out GitVersion.MergeMessage? mergeMessage, GitVersion.ICommit! mergeCommit, GitVersion.Configuration.IGitVersionConfiguration! configuration) -> bool
static GitVersion.MergeMessage.TryParse(GitVersion.ICommit! mergeCommit, GitVersion.Configuration.IGitVersionConfiguration! configuration, out GitVersion.MergeMessage? mergeMessage) -> bool
static GitVersion.ReferenceName.FromBranchName(string! branchName) -> GitVersion.ReferenceName!
static GitVersion.ReferenceName.Parse(string! canonicalName) -> GitVersion.ReferenceName!
static GitVersion.ReferenceName.TryParse(out GitVersion.ReferenceName? value, string! canonicalName) -> bool
Expand Down
2 changes: 1 addition & 1 deletion src/GitVersion.Core/SemVer/SemanticVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class SemanticVersion : IFormattable, IComparable<SemanticVersion>, IEqua
public bool IsLabeledWith(string value) => PreReleaseTag.HasTag() && PreReleaseTag.Name.IsEquivalentTo(value);

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

public SemanticVersion(long major = 0, long minor = 0, long patch = 0)
{
Expand Down

0 comments on commit 51558de

Please sign in to comment.