fix: enable Set as tracking branch should be visible when push to a new branch (#2273)

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo
2026-04-16 10:51:20 +08:00
parent f5d5f63bdd
commit 538001a72f

View File

@@ -58,7 +58,7 @@ namespace SourceGit.ViewModels
set
{
if (SetProperty(ref _selectedRemoteBranch, value, true))
IsSetTrackOptionVisible = value != null && _selectedLocalBranch.Upstream != value.FullName;
IsSetTrackOptionVisible = value != null && (value.Head == null || _selectedLocalBranch.Upstream != value.FullName);
}
}