enhance: disable Fast-Forward for worktree which is not current branch

This commit is contained in:
leo 2024-10-21 16:39:57 +08:00
parent 3b1a54dffd
commit a5e783da08
No known key found for this signature in database

View file

@ -1355,8 +1355,9 @@ namespace SourceGit.ViewModels
};
menu.Items.Add(checkout);
var worktree = _worktrees.Find(x => x.Branch == branch.FullName);
var upstream = _branches.Find(x => x.FullName == branch.Upstream);
if (upstream != null)
if (upstream != null && worktree == null)
{
var fastForward = new MenuItem();
fastForward.Header = new Views.NameHighlightedTextBlock("BranchCM.FastForward", upstream.FriendlyName);