enhance: manually update local branch tree after checking out and fast-forward a exiting local branch (#2169)

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo
2026-03-17 10:49:43 +08:00
parent c47f819ac2
commit 5fdd4e3189

View File

@@ -80,17 +80,19 @@ namespace SourceGit.ViewModels
await new Commands.Stash(_repo.FullPath)
.Use(log)
.PopAsync("stash@{0}");
LocalBranch.Behind.Clear();
LocalBranch.Head = RemoteBranch.Head;
LocalBranch.CommitterDate = RemoteBranch.CommitterDate;
_repo.FastRefreshBranchesAfterCheckout(LocalBranch);
}
else
{
_repo.MarkWorkingCopyDirtyManually();
}
log.Complete();
if (_repo.HistoryFilterMode == Models.FilterMode.Included)
_repo.SetBranchFilterMode(LocalBranch, Models.FilterMode.Included, false, false);
_repo.MarkBranchesDirtyManually();
ProgressDescription = "Waiting for branch updated...";
await Task.Delay(400);
return succ;
}