mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-23 20:47:25 -08:00
feature<Pull>: remember user's choice for Pull
This commit is contained in:
parent
0463879b29
commit
e779d1b65e
3 changed files with 16 additions and 7 deletions
|
@ -141,6 +141,16 @@ namespace SourceGit.Models {
|
|||
/// </summary>
|
||||
public bool UseCombinedDiff { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Pull时是否使用Rebase替换Merge
|
||||
/// </summary>
|
||||
public bool UseRebaseOnPull { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Pull时是否使用自动暂存
|
||||
/// </summary>
|
||||
public bool UseAutoStashOnPull { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// 未暂存视图中变更显示方式
|
||||
/// </summary>
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:controls="clr-namespace:SourceGit.Views.Controls"
|
||||
xmlns:converters="clr-namespace:SourceGit.Views.Converters"
|
||||
xmlns:models="clr-namespace:SourceGit.Models"
|
||||
mc:Ignorable="d"
|
||||
d:DesignWidth="500">
|
||||
<UserControl.Resources>
|
||||
|
@ -81,13 +82,11 @@
|
|||
|
||||
<CheckBox Grid.Row="3" Grid.Column="1"
|
||||
Margin="0,4,0,0"
|
||||
x:Name="chkUseRebase"
|
||||
IsChecked="True"
|
||||
IsChecked="{Binding Source={x:Static models:Preference.Instance}, Path=Window.UseRebaseOnPull, Mode=TwoWay}"
|
||||
Content="{DynamicResource Text.Pull.UseRebase}"/>
|
||||
|
||||
<CheckBox Grid.Row="4" Grid.Column="1"
|
||||
x:Name="chkAutoStash"
|
||||
IsChecked="True"
|
||||
IsChecked="{Binding Source={x:Static models:Preference.Instance}, Path=Window.UseAutoStashOnPull, Mode=TwoWay}"
|
||||
Content="{DynamicResource Text.Pull.AutoStash}"/>
|
||||
</Grid>
|
||||
</controls:PopupWidget>
|
||||
|
|
|
@ -42,8 +42,8 @@ namespace SourceGit.Views.Popups {
|
|||
var branch = cmbBranches.SelectedItem as Models.Branch;
|
||||
if (branch == null) return null;
|
||||
|
||||
var rebase = chkUseRebase.IsChecked == true;
|
||||
var autoStash = chkAutoStash.IsChecked == true;
|
||||
var rebase = Models.Preference.Instance.Window.UseRebaseOnPull;
|
||||
var autoStash = Models.Preference.Instance.Window.UseAutoStashOnPull;
|
||||
|
||||
return Task.Run(() => {
|
||||
Models.Watcher.SetEnabled(repo.Path, false);
|
||||
|
|
Loading…
Reference in a new issue