Skip to content

Commit 03de6d3

Browse files
committed
Merge pull request #486 from onovotny/fix-build-warning
Addresses #485 by only issuing a warning if a commit was specified
2 parents 50833b4 + 61c4b57 commit 03de6d3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

GitVersionCore/GitVersionContext.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,15 @@ public GitVersionContext(IRepository repository, Branch currentBranch, Config co
3434
{
3535
CurrentCommit = commit;
3636
}
37+
else
38+
{
39+
Logger.WriteWarning(string.Format("Commit '{0}' specified but not found", commitId));
40+
}
3741
}
3842

3943
if (CurrentCommit == null)
4044
{
41-
Logger.WriteWarning("No specific commit specified or found, falling back to latest commit on specified branch");
42-
45+
Logger.WriteInfo("Using latest commit on specified branch");
4346
CurrentCommit = currentBranch.Tip;
4447
}
4548

0 commit comments

Comments
 (0)