enhance: navigate to upstream head after fetch, pull, and merge (#1180)

This commit is contained in:
Gadfly 2025-04-14 10:42:34 +08:00 committed by GitHub
parent 245de9b458
commit 17cf402c78
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 60 additions and 12 deletions

View file

@ -40,7 +40,7 @@ namespace SourceGit.Commands
foreach (var b in branches)
{
if (b.IsLocal && !string.IsNullOrEmpty(b.Upstream))
b.IsUpsteamGone = !remoteBranches.Contains(b.Upstream);
b.IsUpstreamGone = !remoteBranches.Contains(b.Upstream);
}
return branches;
@ -86,7 +86,7 @@ namespace SourceGit.Commands
branch.Head = parts[1];
branch.IsCurrent = parts[2] == "*";
branch.Upstream = parts[3];
branch.IsUpsteamGone = false;
branch.IsUpstreamGone = false;
if (branch.IsLocal && !string.IsNullOrEmpty(parts[4]) && !parts[4].Equals("=", StringComparison.Ordinal))
branch.TrackStatus = new QueryTrackStatus(WorkingDirectory, branch.Name, branch.Upstream).Result();