mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-30 16:44:59 +00:00
Add checkout local changes handling
This commit adds the local changes handling behavior for branch checkout. One of three can be selected: stash and reapply after checkout, discard changes or leave them as is (previous behaviour)
This commit is contained in:
parent
5e6059ba36
commit
927a1cab24
7 changed files with 101 additions and 5 deletions
|
@ -15,5 +15,17 @@
|
|||
<Path Width="14" Height="14" Margin="8,0" Data="{StaticResource Icons.Branch}"/>
|
||||
<TextBlock Text="{Binding Branch}"/>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Vertical" IsVisible="{Binding HasLocalChanges}">
|
||||
<TextBlock Text="{DynamicResource Text.Checkout.LocalChanges}"/>
|
||||
<RadioButton Content="{DynamicResource Text.Checkout.LocalChanges.StashAndReply}"
|
||||
GroupName="LocalChanges"
|
||||
IsChecked="{Binding StashLocalChanges, Mode=TwoWay }"/>
|
||||
<RadioButton Content="{DynamicResource Text.Checkout.LocalChanges.Discard}"
|
||||
GroupName="LocalChanges"
|
||||
IsChecked="{Binding DiscardLocalChanges, Mode=TwoWay}"/>
|
||||
<RadioButton Content="{DynamicResource Text.Checkout.LocalChanges.Leave}"
|
||||
GroupName="LocalChanges"
|
||||
IsChecked="{Binding LeaveLocalChanges, Mode=TwoWay}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
|
|
|
@ -298,7 +298,7 @@ namespace SourceGit.Views
|
|||
if (branch.IsCurrent)
|
||||
return;
|
||||
|
||||
ViewModels.PopupHost.ShowAndStartPopup(new ViewModels.Checkout(repo, branch.Name));
|
||||
ViewModels.Checkout.ShowPopup(repo, branch.Name);
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue