8000 enhance: change the default action to deal with local changes on pull… · sourcegit-scm/sourcegit@a717e48 · GitHub
[go: up one dir, main page]

Skip to content

Commit a717e48

Browse files
committed
enhance: change the default action to deal with local changes on pull/checkout/create new branch to Do Nothing (#185)
1 parent a168b05 commit a717e48

File tree

7 files changed

+18
-18
lines changed

7 files changed

+18
-18
lines changed

src/Models/DealWithLocalChanges.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
{
33
public enum DealWithLocalChanges
44
{
5+
DoNothing,
56
StashAndReaply,
67
Discard,
7-
DoNothing,
88
}
99
}

src/ViewModels/Checkout.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,6 @@ public override Task<bool> Sure()
7878
}
7979

8080
private readonly Repository _repo = null;
81-
private Models.DealWithLocalChanges _preAction = Models.DealWithLocalChanges.StashAndReaply;
81+
private Models.DealWithLocalChanges _preAction = Models.DealWithLocalChanges.DoNothing;
8282
}
8383
}

src/ViewModels/CreateBranch.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,6 @@ public override Task<bool> Sure()
138138
private readonly Repository _repo = null;
139139
private string _name = null;
140140
private readonly string _baseOnRevision = null;
141-
private Models.DealWithLocalChanges _preAction = Models.DealWithLocalChanges.StashAndReaply;
141+
private Models.DealWithLocalChanges _preAction = Models.DealWithLocalChanges.DoNothing;
142142
}
143143
}

src/ViewModels/Pull.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,6 @@ public override Task<bool> Sure()
162162
private Models.Remote _selectedRemote = null;
163163
private List<Models.Branch> _remoteBranches = null;
164164
private Models.Branch _selectedBranch = null;
165-
private Models.DealWithLocalChanges _preAction = Models.DealWithLocalChanges.StashAndReaply;
165+
private Models.DealWithLocalChanges _preAction = Models.DealWithLocalChanges.DoNothing;
166166
}
167167
}

src/Views/Checkout.axaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,18 @@
3131
<StackPanel.Resources>
3232
<ac:EnumToBoolConverter x:Key="EnumToBoolConverter"/>
3333
</StackPanel.Resources>
34-
34+
35+
<RadioButton Content="{DynamicResource Text.CreateBranch.LocalChanges.DoNothing}"
36+
GroupName="LocalChanges"
37+
IsChecked="{Binding PreAction, Mode=TwoWay, Converter={StaticResource EnumToBoolConverter}, ConverterParameter={x:Static m:DealWithLocalChanges.DoNothing}}"/>
3538
<RadioButton Content="{DynamicResource Text.CreateBranch.LocalChanges.StashAndReply}"
3639
GroupName="LocalChanges"
40+
Margin="8,0,0,0"
3741
IsChecked="{Binding PreAction, Mode=TwoWay, Converter={StaticResource EnumToBoolConverter}, ConverterParameter={x:Static m:DealWithLocalChanges.StashAndReaply}}"/>
3842
<RadioButton Content="{DynamicResource Text.CreateBranch.LocalChanges.Discard}"
3943
GroupName="LocalChanges"
4044
Margin="8,0,0,0"
4145
IsChecked="{Binding PreAction, Mode=TwoWay, Converter={StaticResource EnumToBoolConverter}, ConverterParameter={x:Static m:DealWithLocalChanges.Discard}}"/>
42-
<RadioButton Content="{DynamicResource Text.CreateBranch.LocalChanges.DoNothing}"
43-
GroupName="LocalChanges"
44-
Margin="8,0,0,0"
45-
IsChecked="{Binding PreAction, Mode=TwoWay, Converter={StaticResource EnumToBoolConverter}, ConverterParameter={x:Static m:DealWithLocalChanges.DoNothing}}"/>
4646
</StackPanel>
4747
</Grid>
4848
</StackPanel>

src/Views/CreateBranch.axaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,18 @@
6565
<StackPanel.Resources>
6666
<ac:EnumToBoolConverter x:Key="EnumToBoolConverter"/>
6767
</StackPanel.Resources>
68-
68+
69+
<RadioButton Content="{DynamicResource Text.CreateBranch.LocalChanges.DoNothing}"
70+
GroupName="LocalChanges"
71+
IsChecked="{Binding PreAction, Mode=TwoWay, Converter={StaticResource EnumToBoolConverter}, ConverterParameter={x:Static m:DealWithLocalChanges.DoNothing}}"/>
6972
<RadioButton Content="{DynamicResource Text.CreateBranch.LocalChanges.StashAndReply}"
7073
GroupName="LocalChanges"
74+
Margin="8,0,0,0"
7175
IsChecked="{Binding PreAction, Mode=TwoWay, Converter={StaticResource EnumToBoolConverter}, ConverterParameter={x:Static m:DealWithLocalChanges.StashAndReaply}}"/>
7276
<RadioButton Content="{DynamicResource Text.CreateBranch.LocalChanges.Discard}"
7377
GroupName="LocalChanges"
7478
Margin="8,0,0,0"
7579
IsChecked="{Binding PreAction, Mode=TwoWay, Converter={StaticResource EnumToBoolConverter}, ConverterParameter={x:Static m:DealWithLocalChanges.Discard}}"/>
76-
<RadioButton Content="{DynamicResource Text.CreateBranch.LocalChanges.DoNothing}"
77-
GroupName="LocalChanges"
78-
Margin="8,0,0,0"
79-
IsChecked="{Binding PreAction, Mode=TwoWay, Converter={StaticResource EnumToBoolConverter}, ConverterParameter={x:Static m:DealWithLocalChanges.DoNothing}}"/>
8080
</StackPanel>
8181

8282
<CheckBox Grid.Row="3" Grid.Column="1"

src/Views/Pull.axaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,17 +72,17 @@
7272
<ac:EnumToBoolConverter x:Key="EnumToBoolConverter"/>
7373
</StackPanel.Resources>
7474

75+
<RadioButton Content="{DynamicResource Text.Pull.LocalChanges.DoNothing}"
76+
GroupName="LocalChanges"
77+
IsChecked="{Binding PreAction, Mode=TwoWay, Converter={StaticResource EnumToBoolConverter}, ConverterParameter={x:Static m:DealWithLocalChanges.DoNothing}}"/>
7578
<RadioButton Content="{DynamicResource Text.Pull.LocalChanges.StashAndReply}"
7679
GroupName="LocalChanges"
80+
Margin="8,0,0,0"
7781
IsChecked="{Binding PreAction, Mode=TwoWay, Converter={StaticResource EnumToBoolConverter}, ConverterParameter={x:Static m:DealWithLocalChanges.StashAndReaply}}"/>
7882
<RadioButton Content="{DynamicResource Text.Pull.LocalChanges.Discard}"
7983
GroupName="LocalChanges"
8084
Margin="8,0,0,0"
8185
IsChecked="{Binding PreAction, Mode=TwoWay, Converter={StaticResource EnumToBoolConverter}, ConverterParameter={x:Static m:DealWithLocalChanges.Discard}}"/>
82-
<RadioButton Content="{DynamicResource Text.Pull.LocalChanges.DoNothing}"
83-
GroupName="LocalChanges"
84-
Margin="8,0,0,0"
85-
IsChecked="{Binding PreAction, Mode=TwoWay, Converter={StaticResource EnumToBoolConverter}, ConverterParameter={x:Static m:DealWithLocalChanges.DoNothing}}"/>
8686
</StackPanel>
8787

8888
<CheckBox Grid.Row="4" Grid.Column="1"

0 commit comments

Comments
 (0)
0