diff --git a/src/UI/Dashboard.xaml.cs b/src/UI/Dashboard.xaml.cs index 2bc1b05f..e47eeb3b 100644 --- a/src/UI/Dashboard.xaml.cs +++ b/src/UI/Dashboard.xaml.cs @@ -594,6 +594,7 @@ namespace SourceGit.UI { var push = new MenuItem(); push.Header = App.Format("BranchCM.Push", branch.Name); + push.IsEnabled = !string.IsNullOrEmpty(branch.UpstreamTrack); push.Click += (o, e) => { Push.Show(repo, branch); e.Handled = true; @@ -613,6 +614,7 @@ namespace SourceGit.UI { var upstream = branch.Upstream.Substring(13); var fastForward = new MenuItem(); fastForward.Header = App.Format("BranchCM.FastForward", upstream); + fastForward.IsEnabled = !string.IsNullOrEmpty(branch.UpstreamTrack); fastForward.Click += (o, e) => { Merge.StartDirectly(repo, upstream, branch.Name); e.Handled = true; @@ -620,6 +622,7 @@ namespace SourceGit.UI { var pull = new MenuItem(); pull.Header = App.Format("BranchCM.Pull", upstream); + pull.IsEnabled = !string.IsNullOrEmpty(branch.UpstreamTrack); pull.Click += (o, e) => { Pull.Show(repo); e.Handled = true; diff --git a/src/UI/Histories.xaml.cs b/src/UI/Histories.xaml.cs index 8ac0f227..4114677c 100644 --- a/src/UI/Histories.xaml.cs +++ b/src/UI/Histories.xaml.cs @@ -227,6 +227,7 @@ namespace SourceGit.UI { var upstream = branch.Upstream.Substring(13); var fastForward = new MenuItem(); fastForward.Header = App.Format("BranchCM.FastForward", upstream); + fastForward.IsEnabled = !string.IsNullOrEmpty(branch.UpstreamTrack); fastForward.Click += (o, e) => { Merge.StartDirectly(Repo, upstream, branch.Name); e.Handled = true; @@ -235,6 +236,7 @@ namespace SourceGit.UI { var pull = new MenuItem(); pull.Header = App.Format("BranchCM.Pull", upstream); + pull.IsEnabled = !string.IsNullOrEmpty(branch.UpstreamTrack); pull.Click += (o, e) => { Pull.Show(Repo); e.Handled = true; @@ -244,6 +246,7 @@ namespace SourceGit.UI { var push = new MenuItem(); push.Header = App.Format("BranchCM.Push", branch.Name); + push.IsEnabled = !string.IsNullOrEmpty(branch.UpstreamTrack); push.Click += (o, e) => { Push.Show(Repo, branch); e.Handled = true;