Skip to content

Commit

Permalink
minor changes based on review
Browse files Browse the repository at this point in the history
  • Loading branch information
arturcic committed Jan 19, 2021
1 parent 91148d8 commit 6392cd9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static class GitToolsTestingExtensions
public static ICommit CreateMockCommit()
{
var objectId = Substitute.For<IObjectId>();
objectId.Sha.Returns(Guid.NewGuid().ToString().Replace("-", "") + "00000000");
objectId.Sha.Returns(Guid.NewGuid().ToString("n") + "00000000");

var commit = Substitute.For<ICommit>();
commit.Id.Returns(objectId);
Expand Down
2 changes: 1 addition & 1 deletion src/GitVersionCore/Git/ReferenceName.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class ReferenceName : IEquatable<ReferenceName>, IComparable<ReferenceNam

public ReferenceName(string canonical)
{
Canonical = canonical;
Canonical = canonical ?? throw new ArgumentNullException(nameof(canonical));
Friendly = Shorten();
WithoutRemote = RemoveRemote();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class NextVersionCalculator : INextVersionCalculator

public SemanticVersion FindVersion()
{
log.Info($"Running against branch: {context.CurrentBranch} ({(context.CurrentCommit != null ? context.CurrentCommit.ToString() : "-")})");
log.Info($"Running against branch: {context.CurrentBranch} ({context.CurrentCommit?.ToString() ?? "-"})");
if (context.IsCurrentCommitTagged)
{
log.Info($"Current commit is tagged with version {context.CurrentCommitTaggedVersion}, " +
Expand Down

0 comments on commit 6392cd9

Please sign in to comment.