mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -08:00
enhance: disable Fast-Forward
for worktree which is not current branch
This commit is contained in:
parent
3b1a54dffd
commit
a5e783da08
1 changed files with 2 additions and 1 deletions
|
@ -1355,8 +1355,9 @@ namespace SourceGit.ViewModels
|
||||||
};
|
};
|
||||||
menu.Items.Add(checkout);
|
menu.Items.Add(checkout);
|
||||||
|
|
||||||
|
var worktree = _worktrees.Find(x => x.Branch == branch.FullName);
|
||||||
var upstream = _branches.Find(x => x.FullName == branch.Upstream);
|
var upstream = _branches.Find(x => x.FullName == branch.Upstream);
|
||||||
if (upstream != null)
|
if (upstream != null && worktree == null)
|
||||||
{
|
{
|
||||||
var fastForward = new MenuItem();
|
var fastForward = new MenuItem();
|
||||||
fastForward.Header = new Views.NameHighlightedTextBlock("BranchCM.FastForward", upstream.FriendlyName);
|
fastForward.Header = new Views.NameHighlightedTextBlock("BranchCM.FastForward", upstream.FriendlyName);
|
||||||
|
|
Loading…
Reference in a new issue