fix: should use file.SHA instead of _commit.SHA to query submodule's commit
Some checks are pending
Continuous Integration / Build (push) Waiting to run
Continuous Integration / Prepare version string (push) Waiting to run
Continuous Integration / Package (push) Blocked by required conditions

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2025-06-05 21:54:09 +08:00
parent f04b0c5d97
commit f003f67129
No known key found for this signature in database

View file

@ -245,9 +245,9 @@ namespace SourceGit.ViewModels
case Models.ObjectType.Commit:
Task.Run(() =>
{
var submoduleRoot = Path.Combine(_repo.FullPath, file.Path);
var commit = new Commands.QuerySingleCommit(submoduleRoot, _commit.SHA).Result();
var message = commit != null ? new Commands.QueryCommitFullMessage(submoduleRoot, _commit.SHA).Result() : null;
var submoduleRoot = Path.Combine(_repo.FullPath, file.Path).Replace('\\', '/').Trim('/');
var commit = new Commands.QuerySingleCommit(submoduleRoot, file.SHA).Result();
var message = commit != null ? new Commands.QueryCommitFullMessage(submoduleRoot, file.SHA).Result() : null;
var module = new Models.RevisionSubmodule()
{
Commit = commit ?? new Models.Commit() { SHA = _commit.SHA },