diff --git a/src/NerdBank.GitVersioning/ManagedGit/GitRepository.cs b/src/NerdBank.GitVersioning/ManagedGit/GitRepository.cs index 40cfc644..1d3b78b2 100644 --- a/src/NerdBank.GitVersioning/ManagedGit/GitRepository.cs +++ b/src/NerdBank.GitVersioning/ManagedGit/GitRepository.cs @@ -616,7 +616,9 @@ private GitObjectId ResolveReference(object reference) { if (!FileHelpers.TryOpen(Path.Combine(this.CommonDirectory, (string)reference), out FileStream? stream)) { - return GitObjectId.Empty; + // HEAD can point to a reference that's in the packed references and needs + // a full resolution. + return Lookup((string)reference) ?? GitObjectId.Empty; } using (stream)