diff --git a/src/ViewModels/Pull.cs b/src/ViewModels/Pull.cs index 152cbb9e..75c0f47a 100644 --- a/src/ViewModels/Pull.cs +++ b/src/ViewModels/Pull.cs @@ -210,7 +210,7 @@ namespace SourceGit.ViewModels } if (!autoSelectedBranch) - SelectedBranch = branches.Count > 0 ? branches[0] : null; + SelectedBranch = null; } private readonly Repository _repo = null; diff --git a/src/ViewModels/Repository.cs b/src/ViewModels/Repository.cs index 4f550ddd..42d26f94 100644 --- a/src/ViewModels/Repository.cs +++ b/src/ViewModels/Repository.cs @@ -490,10 +490,11 @@ namespace SourceGit.ViewModels return; } - if (autoStart) - PopupHost.ShowAndStartPopup(new Pull(this, null)); + var pull = new Pull(this, null); + if (autoStart && pull.SelectedBranch != null) + PopupHost.ShowAndStartPopup(pull); else - PopupHost.ShowPopup(new Pull(this, null)); + PopupHost.ShowPopup(pull); } public void Push(bool autoStart)