Skip to content

Commit f003f67

Browse files
committed
fix: should use file.SHA instead of _commit.SHA to query submodule's commit
Signed-off-by: leo <[email protected]>
1 parent f04b0c5 commit f003f67

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ViewModels/CommitDetail.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,9 @@ public void ViewRevisionFile(Models.Object file)
245245
case Models.ObjectType.Commit:
246246
Task.Run(() =>
247247
{
248-
var submoduleRoot = Path.Combine(_repo.FullPath, file.Path);
249-
var commit = new Commands.QuerySingleCommit(submoduleRoot, _commit.SHA).Result();
250-
var message = commit != null ? new Commands.QueryCommitFullMessage(submoduleRoot, _commit.SHA).Result() : null;
248+
var submoduleRoot = Path.Combine(_repo.FullPath, file.Path).Replace('\\', '/').Trim('/');
249+
var commit = new Commands.QuerySingleCommit(submoduleRoot, file.SHA).Result();
250+
var message = commit != null ? new Commands.QueryCommitFullMessage(submoduleRoot, file.SHA).Result() : null;
251251
var module = new Models.RevisionSubmodule()
252252
{
253253
Commit = commit ?? new Models.Commit() { SHA = _commit.SHA },

0 commit comments

Comments
 (0)