Skip to content

Commit 0acff99

Browse files
committed
refactor: use <revision_sha>^ instead of <revision_parent_sha> as base revsion when getting changes of commit (#1625)
Signed-off-by: leo <longshuang@msn.cn>
1 parent ab14e81 commit 0acff99

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ViewModels/CommitDetail.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ private void Refresh()
354354

355355
Task.Run(async () =>
356356
{
357-
var parent = _commit.Parents.Count == 0 ? Models.Commit.EmptyTreeSHA1 : _commit.Parents[0];
357+
var parent = _commit.Parents.Count == 0 ? Models.Commit.EmptyTreeSHA1 : $"{_commit.SHA}^";
358358
var cmd = new Commands.CompareRevisions(_repo.FullPath, parent, _commit.SHA) { CancellationToken = token };
359359
var changes = await cmd.ReadAsync().ConfigureAwait(false);
360360
var visible = changes;

0 commit comments

Comments
 (0)