mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-23 13:14:59 +00:00
feature: add a button to see which branches and tags that contains selected commit (#388)
This commit is contained in:
parent
fcc8a41ad1
commit
6ab0900b20
14 changed files with 171 additions and 18 deletions
|
@ -141,6 +141,11 @@ namespace SourceGit.ViewModels
|
|||
_repo?.NavigateToCommit(commitSHA);
|
||||
}
|
||||
|
||||
public List<Models.Decorator> GetRefsContainsThisCommit()
|
||||
{
|
||||
return new Commands.QueryRefsContainsCommit(_repo.FullPath, _commit.SHA).Result();
|
||||
}
|
||||
|
||||
public void ClearSearchChangeFilter()
|
||||
{
|
||||
SearchChangeFilter = string.Empty;
|
||||
|
@ -460,14 +465,18 @@ namespace SourceGit.ViewModels
|
|||
if (_commit == null)
|
||||
return;
|
||||
|
||||
Task.Run(() =>
|
||||
{
|
||||
var fullMessage = new Commands.QueryCommitFullMessage(_repo.FullPath, _commit.SHA).Result();
|
||||
Dispatcher.UIThread.Invoke(() => FullMessage = fullMessage);
|
||||
});
|
||||
|
||||
if (_cancelToken != null)
|
||||
_cancelToken.Requested = true;
|
||||
|
||||
_cancelToken = new Commands.Command.CancelToken();
|
||||
|
||||
Task.Run(() =>
|
||||
{
|
||||
var fullMessage = new Commands.QueryCommitFullMessage(_repo.FullPath, _commit.SHA).Result();
|
||||
var parent = _commit.Parents.Count == 0 ? "4b825dc642cb6eb9a060e54bf8d69288fbee4904" : _commit.Parents[0];
|
||||
var cmdChanges = new Commands.CompareRevisions(_repo.FullPath, parent, _commit.SHA) { Cancel = _cancelToken };
|
||||
var changes = cmdChanges.Result();
|
||||
|
@ -486,7 +495,6 @@ namespace SourceGit.ViewModels
|
|||
{
|
||||
Dispatcher.UIThread.Post(() =>
|
||||
{
|
||||
FullMessage = fullMessage;
|
||||
Changes = changes;
|
||||
VisibleChanges = visible;
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue