mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 20:24:59 +00:00
feature: allow to ignore local changes also when switching branch or pulling changes (#151)
This commit is contained in:
parent
69f9dceece
commit
0b09d210be
13 changed files with 253 additions and 212 deletions
|
@ -513,7 +513,7 @@ namespace SourceGit.ViewModels
|
|||
checkout.Icon = App.CreateMenuIcon("Icons.Check");
|
||||
checkout.Click += (o, e) =>
|
||||
{
|
||||
_repo.CheckoutLocalBranch(branch.Name);
|
||||
_repo.CheckoutBranch(branch);
|
||||
e.Handled = true;
|
||||
};
|
||||
submenu.Items.Add(checkout);
|
||||
|
@ -585,20 +585,7 @@ namespace SourceGit.ViewModels
|
|||
checkout.Icon = App.CreateMenuIcon("Icons.Check");
|
||||
checkout.Click += (o, e) =>
|
||||
{
|
||||
foreach (var b in _repo.Branches)
|
||||
{
|
||||
if (b.IsLocal && b.Upstream == branch.FullName)
|
||||
{
|
||||
if (!b.IsCurrent)
|
||||
_repo.CheckoutLocalBranch(b.Name);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (PopupHost.CanCreatePopup())
|
||||
PopupHost.ShowPopup(new CreateBranch(_repo, branch));
|
||||
|
||||
_repo.CheckoutBranch(branch);
|
||||
e.Handled = true;
|
||||
};
|
||||
submenu.Items.Add(checkout);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue