mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-23 02:12:25 +08:00
feature: display commit's detail info even if the commit is not shown in histories
This commit is contained in:
@@ -113,11 +113,19 @@ namespace SourceGit.ViewModels
|
||||
public void NavigateTo(string commitSHA)
|
||||
{
|
||||
var commit = _commits.Find(x => x.SHA.StartsWith(commitSHA, StringComparison.Ordinal));
|
||||
if (commit != null)
|
||||
if (commit == null)
|
||||
{
|
||||
AutoSelectedCommit = null;
|
||||
commit = new Commands.QuerySingleCommit(_repo.FullPath, commitSHA).Result();
|
||||
}
|
||||
else
|
||||
{
|
||||
AutoSelectedCommit = commit;
|
||||
NavigationId = _navigationId + 1;
|
||||
}
|
||||
|
||||
if (commit != null)
|
||||
{
|
||||
if (_detailContext is CommitDetail detail)
|
||||
{
|
||||
detail.Commit = commit;
|
||||
@@ -129,6 +137,10 @@ namespace SourceGit.ViewModels
|
||||
DetailContext = commitDetail;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DetailContext = null;
|
||||
}
|
||||
}
|
||||
|
||||
public void Select(IList commits)
|
||||
|
||||
Reference in New Issue
Block a user