mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 12:45:00 +00:00
<fix>(*): 撤销了 commit ceff6ef102
This commit is contained in:
parent
a41c7a7b1c
commit
9ea9d18a4d
9 changed files with 25 additions and 83 deletions
|
@ -6,7 +6,7 @@
|
|||
xmlns:git="clr-namespace:SourceGit.Git"
|
||||
xmlns:converters="clr-namespace:SourceGit.Converters"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="192" d:DesignWidth="500" Height="224" Width="500">
|
||||
d:DesignHeight="192" d:DesignWidth="500" Height="192" Width="500">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="32"/>
|
||||
|
@ -14,7 +14,6 @@
|
|||
<RowDefinition Height="32"/>
|
||||
<RowDefinition Height="32"/>
|
||||
<RowDefinition Height="32"/>
|
||||
<RowDefinition Height="32"/>
|
||||
<RowDefinition Height="16"/>
|
||||
<RowDefinition Height="32"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
@ -42,24 +41,17 @@
|
|||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<Label Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" Content="Recurse Submodules :"/>
|
||||
<StackPanel Grid.Row="3" Grid.Column="1" Orientation="Horizontal">
|
||||
<RadioButton x:Name="RbtnRrsSubModYes" Content="Yes" GroupName="RecurseSubmodules"/>
|
||||
<RadioButton x:Name="RbtnRrsSubModDemand" Content="On-Demand" Margin="8,0,0,0" GroupName="RecurseSubmodules" IsChecked="True"/>
|
||||
<RadioButton x:Name="RbtnRrsSubModNo" Content="No" Margin="8,0,0,0" GroupName="RecurseSubmodules"/>
|
||||
</StackPanel>
|
||||
|
||||
<CheckBox Grid.Row="4" Grid.Column="1"
|
||||
<CheckBox Grid.Row="3" Grid.Column="1"
|
||||
x:Name="chkFetchAll"
|
||||
IsChecked="True"
|
||||
Content="Fetch all remotes"/>
|
||||
|
||||
<CheckBox Grid.Row="5" Grid.Column="1"
|
||||
<CheckBox Grid.Row="4" Grid.Column="1"
|
||||
x:Name="chkPrune"
|
||||
IsChecked="True"
|
||||
Content="Prune remote dead branches"/>
|
||||
|
||||
<Grid Grid.Row="7" Grid.ColumnSpan="2">
|
||||
<Grid Grid.Row="6" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="80"/>
|
||||
|
|
|
@ -50,23 +50,14 @@ namespace SourceGit.UI {
|
|||
/// <param name="e"></param>
|
||||
private async void Start(object sender, RoutedEventArgs e) {
|
||||
bool prune = chkPrune.IsChecked == true;
|
||||
|
||||
string subMod;
|
||||
if (RbtnRrsSubModYes.IsChecked == true) {
|
||||
subMod = "--recurse-submodules=yes";
|
||||
} else if (RbtnRrsSubModNo.IsChecked == true) {
|
||||
subMod = "--recurse-submodules=no";
|
||||
} else {
|
||||
subMod = "--recurse-submodules=on-demand";
|
||||
}
|
||||
|
||||
PopupManager.Lock();
|
||||
|
||||
if (chkFetchAll.IsChecked == true) {
|
||||
await Task.Run(() => repo.Fetch(null, subMod, prune, PopupManager.UpdateStatus));
|
||||
await Task.Run(() => repo.Fetch(null, prune, PopupManager.UpdateStatus));
|
||||
} else {
|
||||
var remote = combRemotes.SelectedItem as Git.Remote;
|
||||
await Task.Run(() => repo.Fetch(remote, subMod, prune, PopupManager.UpdateStatus));
|
||||
await Task.Run(() => repo.Fetch(remote, prune, PopupManager.UpdateStatus));
|
||||
}
|
||||
|
||||
PopupManager.Close(true);
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="248" d:DesignWidth="500" Height="280" Width="500">
|
||||
d:DesignHeight="248" d:DesignWidth="500" Height="248" Width="500">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="32"/>
|
||||
|
@ -12,7 +12,6 @@
|
|||
<RowDefinition Height="32"/>
|
||||
<RowDefinition Height="32"/>
|
||||
<RowDefinition Height="32"/>
|
||||
<RowDefinition Height="32"/>
|
||||
<RowDefinition Height="28"/>
|
||||
<RowDefinition Height="28"/>
|
||||
<RowDefinition Height="16"/>
|
||||
|
@ -61,26 +60,19 @@
|
|||
<Label x:Name="txtInto" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
|
||||
<Label Grid.Row="5" Grid.Column="0" HorizontalAlignment="Right" Content="Recurse Submodules :"/>
|
||||
<StackPanel Grid.Row="5" Grid.Column="1" Orientation="Horizontal">
|
||||
<RadioButton x:Name="RbtnRrsSubModYes" Content="Yes" GroupName="RecurseSubmodules"/>
|
||||
<RadioButton x:Name="RbtnRrsSubModDemand" Content="On-Demand" Margin="8,0,0,0" GroupName="RecurseSubmodules" IsChecked="True"/>
|
||||
<RadioButton x:Name="RbtnRrsSubModNo" Content="No" Margin="8,0,0,0" GroupName="RecurseSubmodules"/>
|
||||
</StackPanel>
|
||||
|
||||
<CheckBox Grid.Row="6" Grid.Column="1"
|
||||
<CheckBox Grid.Row="5" Grid.Column="1"
|
||||
x:Name="chkRebase"
|
||||
IsChecked="True"
|
||||
VerticalAlignment="Center"
|
||||
Content="Use rebase instead of merge"/>
|
||||
|
||||
<CheckBox Grid.Row="7" Grid.Column="1"
|
||||
<CheckBox Grid.Row="6" Grid.Column="1"
|
||||
x:Name="chkAutoStash"
|
||||
IsChecked="True"
|
||||
VerticalAlignment="Center"
|
||||
Content="Stash & reapply local changes"/>
|
||||
|
||||
<Grid Grid.Row="9" Grid.ColumnSpan="2">
|
||||
<Grid Grid.Row="8" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="80"/>
|
||||
|
|
|
@ -76,17 +76,8 @@ namespace SourceGit.UI {
|
|||
|
||||
if (remote == null || branch == null) return;
|
||||
|
||||
string subMod;
|
||||
if (RbtnRrsSubModYes.IsChecked == true) {
|
||||
subMod = "--recurse-submodules=yes";
|
||||
} else if (RbtnRrsSubModNo.IsChecked == true) {
|
||||
subMod = "--recurse-submodules=no";
|
||||
} else {
|
||||
subMod = "--recurse-submodules=on-demand";
|
||||
}
|
||||
|
||||
PopupManager.Lock();
|
||||
await Task.Run(() => repo.Pull(remote, branch.Substring(branch.IndexOf('/')+1), subMod, PopupManager.UpdateStatus, rebase, autoStash));
|
||||
await Task.Run(() => repo.Pull(remote, branch.Substring(branch.IndexOf('/')+1), PopupManager.UpdateStatus, rebase, autoStash));
|
||||
PopupManager.Close(true);
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:git="clr-namespace:SourceGit.Git"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="248" d:DesignWidth="500" Height="280" Width="500">
|
||||
d:DesignHeight="248" d:DesignWidth="500" Height="248" Width="500">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="32"/>
|
||||
|
@ -13,7 +13,6 @@
|
|||
<RowDefinition Height="32"/>
|
||||
<RowDefinition Height="32"/>
|
||||
<RowDefinition Height="32"/>
|
||||
<RowDefinition Height="32"/>
|
||||
<RowDefinition Height="28"/>
|
||||
<RowDefinition Height="28"/>
|
||||
<RowDefinition Height="16"/>
|
||||
|
@ -71,25 +70,17 @@
|
|||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<Label Grid.Row="5" Grid.Column="0" HorizontalAlignment="Right" Content="Recurse Submodules :"/>
|
||||
<StackPanel Grid.Row="5" Grid.Column="1" Orientation="Horizontal">
|
||||
<RadioButton x:Name="RbtnRrsSubModCheck" Content="Check" GroupName="RecurseSubmodules"/>
|
||||
<RadioButton x:Name="RbtnRrsSubModDemand" Content="On-Demand" Margin="8,0,0,0" GroupName="RecurseSubmodules" />
|
||||
<RadioButton x:Name="RbtnRrsSubModOnly" Content="Only" Margin="8,0,0,0" GroupName="RecurseSubmodules"/>
|
||||
<RadioButton x:Name="RbtnRrsSubModNo" Content="No" Margin="8,0,0,0" GroupName="RecurseSubmodules" IsChecked="True"/>
|
||||
</StackPanel>
|
||||
|
||||
<CheckBox Grid.Row="6" Grid.Column="1"
|
||||
<CheckBox Grid.Row="5" Grid.Column="1"
|
||||
x:Name="chkTags"
|
||||
VerticalAlignment="Center"
|
||||
Content="Push all tags"/>
|
||||
|
||||
<CheckBox Grid.Row="7" Grid.Column="1"
|
||||
<CheckBox Grid.Row="6" Grid.Column="1"
|
||||
x:Name="chkForce"
|
||||
VerticalAlignment="Center"
|
||||
Content="Force push"/>
|
||||
|
||||
<Grid Grid.Row="9" Grid.ColumnSpan="2">
|
||||
<Grid Grid.Row="8" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="80"/>
|
||||
|
|
|
@ -53,7 +53,7 @@ namespace SourceGit.UI {
|
|||
var remoteBranch = upstream.Substring(remoteIdx + 1);
|
||||
|
||||
Task.Run(() => {
|
||||
repo.Push(remote, current.Name, remoteBranch, "--recurse-submodules=no", PopupManager.UpdateStatus);
|
||||
repo.Push(remote, current.Name, remoteBranch, PopupManager.UpdateStatus);
|
||||
push.Dispatcher.Invoke(() => {
|
||||
PopupManager.Close(true);
|
||||
});
|
||||
|
@ -90,18 +90,6 @@ namespace SourceGit.UI {
|
|||
var track = string.IsNullOrEmpty(localBranch.Upstream);
|
||||
var tags = chkTags.IsChecked == true;
|
||||
var force = chkForce.IsChecked == true;
|
||||
|
||||
string subMod;
|
||||
if (RbtnRrsSubModCheck.IsChecked == true) {
|
||||
subMod = "--recurse-submodules=check";
|
||||
} else if (RbtnRrsSubModDemand.IsChecked == true) {
|
||||
subMod = "--recurse-submodules=on-demand";
|
||||
}
|
||||
else if (RbtnRrsSubModOnly.IsChecked == true) {
|
||||
subMod = "--recurse-submodules=only";
|
||||
} else{
|
||||
subMod = "--recurse-submodules=no";
|
||||
}
|
||||
|
||||
remoteBranch = remoteBranch.Substring($"{remote}/".Length);
|
||||
if (remoteBranch.Contains(" (new)")) {
|
||||
|
@ -109,7 +97,7 @@ namespace SourceGit.UI {
|
|||
}
|
||||
|
||||
PopupManager.Lock();
|
||||
await Task.Run(() => repo.Push(remote, localBranch.Name, remoteBranch, subMod, PopupManager.UpdateStatus, tags, track, force));
|
||||
await Task.Run(() => repo.Push(remote, localBranch.Name, remoteBranch, PopupManager.UpdateStatus, tags, track, force));
|
||||
PopupManager.Close(true);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue