diff --git a/ExternalProjects/BizHawk.SrcGen.VersionInfo/VersionInfoGenerator.cs b/ExternalProjects/BizHawk.SrcGen.VersionInfo/VersionInfoGenerator.cs index 62dcb4ff451..d9deaeabe2a 100644 --- a/ExternalProjects/BizHawk.SrcGen.VersionInfo/VersionInfoGenerator.cs +++ b/ExternalProjects/BizHawk.SrcGen.VersionInfo/VersionInfoGenerator.cs @@ -49,7 +49,7 @@ public void Execute(GeneratorExecutionContext context) var rev = ExecuteGitWithArguments($"-C {projectDir} rev-list HEAD --count") ?? string.Empty; var branch = ExecuteGitWithArguments($"-C {projectDir} rev-parse --abbrev-ref HEAD") ?? "master"; - var shortHash = ExecuteGitWithArguments($"-C {projectDir} log -1 --format=\"%h\"") ?? "000000000"; + var hash = ExecuteGitWithArguments($"-C {projectDir} log -1 --format=\"%H\"") ?? "0000000000000000000000000000000000000000"; // Generated source code string source = $@"namespace BizHawk.Common @@ -58,7 +58,8 @@ public static partial class VersionInfo {{ public const string SVN_REV = ""{rev}""; public const string GIT_BRANCH = ""{branch}""; - public const string GIT_SHORTHASH = ""{shortHash}""; + public const string GIT_HASH = ""{hash}""; + public const string GIT_SHORTHASH = ""{hash.Substring(startIndex: 0, length: 9)}""; }} }} "; diff --git a/References/BizHawk.SrcGen.VersionInfo.dll b/References/BizHawk.SrcGen.VersionInfo.dll index 9934224fffb..87cdf9c34b8 100644 Binary files a/References/BizHawk.SrcGen.VersionInfo.dll and b/References/BizHawk.SrcGen.VersionInfo.dll differ diff --git a/src/BizHawk.Client.EmuHawk/BizBox.cs b/src/BizHawk.Client.EmuHawk/BizBox.cs index 404c17869a5..d0c1b638fc1 100644 --- a/src/BizHawk.Client.EmuHawk/BizBox.cs +++ b/src/BizHawk.Client.EmuHawk/BizBox.cs @@ -58,9 +58,7 @@ private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs => Process.Start((string) ((Control) sender).Tag); private void btnCopyHash_Click(object sender, EventArgs e) - { - Clipboard.SetText(VersionInfo.GIT_SHORTHASH); - } + => Clipboard.SetText(VersionInfo.GIT_HASH); private void linkLabel3_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) => Process.Start(VersionInfo.BizHawkContributorsListURI); diff --git a/src/BizHawk.Common/VersionInfo.cs b/src/BizHawk.Common/VersionInfo.cs index 5e8c3c03483..a9a8ba2e9ef 100644 --- a/src/BizHawk.Common/VersionInfo.cs +++ b/src/BizHawk.Common/VersionInfo.cs @@ -41,7 +41,7 @@ static VersionInfo() } public static (string Label, string TargetURI) GetGitCommitLink() - => ($"Commit :{GIT_BRANCH}@{GIT_SHORTHASH}", $"https://github.com/TASEmulators/BizHawk/commit/{GIT_SHORTHASH}"); + => ($"Commit :{GIT_BRANCH}@{GIT_SHORTHASH}", $"https://github.com/TASEmulators/BizHawk/commit/{GIT_HASH}"); public static string GetFullVersionDetails() {