Skip to content

Commit 3f6de5b

Browse files
committed
enhance: leave remote branch to empty while pulling changes from remote (#469)
1 parent ab8b27c commit 3f6de5b

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/ViewModels/Pull.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ private void PostRemoteSelected()
210210
}
211211

212212
if (!autoSelectedBranch)
213-
SelectedBranch = branches.Count > 0 ? branches[0] : null;
213+
SelectedBranch = null;
214214
}
215215

216216
private readonly Repository _repo = null;

src/ViewModels/Repository.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -490,10 +490,11 @@ public void Pull(bool autoStart)
490490
return;
491491
}
492492

493-
if (autoStart)
494-
PopupHost.ShowAndStartPopup(new Pull(this, null));
493+
var pull = new Pull(this, null);
494+
if (autoStart && pull.SelectedBranch != null)
495+
PopupHost.ShowAndStartPopup(pull);
495496
else
496-
PopupHost.ShowPopup(new Pull(this, null));
497+
PopupHost.ShowPopup(pull);
497498
}
498499

499500
public void Push(bool autoStart)

0 commit comments

Comments
 (0)