Skip to content

Commit 5466e2e

Browse files
committed
Fix version reported at implied HEAD ref
Fixes #384
1 parent 203a5eb commit 5466e2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/NerdBank.GitVersioning/VersionOracle.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public VersionOracle(string projectDirectory, LibGit2Sharp.Repository repo, LibG
5656
: projectDirectory.Substring(repoRoot.Length).TrimStart(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar))
5757
: null;
5858

59-
var commit = head ?? repo?.Head.Commits.FirstOrDefault();
59+
var commit = head ?? repo?.Head.Tip;
6060

6161
var committedVersion = VersionFile.GetVersion(commit, relativeRepoProjectDirectory);
6262

0 commit comments

Comments
 (0)