diff --git a/ExternalProjects/BizHawk.SrcGen.VersionInfo/VersionInfoGenerator.cs b/ExternalProjects/BizHawk.SrcGen.VersionInfo/VersionInfoGenerator.cs index 62dcb4ff45..d9deaeabe2 100644 --- a/ExternalProjects/BizHawk.SrcGen.VersionInfo/VersionInfoGenerator.cs +++ b/ExternalProjects/BizHawk.SrcGen.VersionInfo/VersionInfoGenerator.cs @@ -49,7 +49,7 @@ public class VersionInfoGenerator : ISourceGenerator 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 class VersionInfoGenerator : ISourceGenerator {{ 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 9934224fff..87cdf9c34b 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 404c17869a..d0c1b638fc 100644 --- a/src/BizHawk.Client.EmuHawk/BizBox.cs +++ b/src/BizHawk.Client.EmuHawk/BizBox.cs @@ -58,9 +58,7 @@ namespace BizHawk.Client.EmuHawk => 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 5e8c3c0348..a9a8ba2e9e 100644 --- a/src/BizHawk.Common/VersionInfo.cs +++ b/src/BizHawk.Common/VersionInfo.cs @@ -41,7 +41,7 @@ namespace BizHawk.Common } 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() {