We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents efdc168 + 3874dda commit 2ae8428Copy full SHA for 2ae8428
LibGit2Sharp/Version.cs
@@ -59,7 +59,8 @@ private string RetrieveAbbrevShaFrom(string name)
59
{
60
string sha = ReadContentFromResource(assembly, name) ?? "unknown";
61
62
- return sha.Substring(0, 7);
+ var index = sha.Length > 7 ? 7 : sha.Length;
63
+ return sha.Substring(0, index);
64
}
65
66
/// <summary>
0 commit comments