mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 04:34:59 +00: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…
Add table
Add a link
Reference in a new issue