mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -08:00
feature: display commit's detail info even if the commit is not shown in histories
This commit is contained in:
parent
5574dd2c38
commit
0ed1f369e9
1 changed files with 13 additions and 1 deletions
|
@ -113,11 +113,19 @@ namespace SourceGit.ViewModels
|
||||||
public void NavigateTo(string commitSHA)
|
public void NavigateTo(string commitSHA)
|
||||||
{
|
{
|
||||||
var commit = _commits.Find(x => x.SHA.StartsWith(commitSHA, StringComparison.Ordinal));
|
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;
|
AutoSelectedCommit = commit;
|
||||||
NavigationId = _navigationId + 1;
|
NavigationId = _navigationId + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (commit != null)
|
||||||
|
{
|
||||||
if (_detailContext is CommitDetail detail)
|
if (_detailContext is CommitDetail detail)
|
||||||
{
|
{
|
||||||
detail.Commit = commit;
|
detail.Commit = commit;
|
||||||
|
@ -129,6 +137,10 @@ namespace SourceGit.ViewModels
|
||||||
DetailContext = commitDetail;
|
DetailContext = commitDetail;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DetailContext = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Select(IList commits)
|
public void Select(IList commits)
|
||||||
|
|
Loading…
Reference in a new issue