fix: ahead/behind indicator of commit in histories view not updated after upstream changed

This commit is contained in:
leo 2024-08-09 15:17:04 +08:00
parent ce7420354d
commit c596427380
No known key found for this signature in database
6 changed files with 99 additions and 29 deletions

View file

@ -749,20 +749,8 @@ namespace SourceGit.ViewModels
limits += "--branches --remotes --tags";
}
var canPushCommits = new HashSet<string>();
var canPullCommits = new HashSet<string>();
var currentBranch = _branches.Find(x => x.IsCurrent);
if (currentBranch != null)
{
foreach (var sha in currentBranch.TrackStatus.Ahead)
canPushCommits.Add(sha);
foreach (var sha in currentBranch.TrackStatus.Behind)
canPullCommits.Add(sha);
}
var commits = new Commands.QueryCommits(_fullpath, limits).Result();
var graph = Models.CommitGraph.Parse(commits, canPushCommits, canPullCommits);
var graph = Models.CommitGraph.Parse(commits);
Dispatcher.UIThread.Invoke(() =>
{