mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 04:34:59 +00:00
feat(*): 为 Pull、Fetch、Push 增加 --recurse-submodules 选项参数
This commit is contained in:
parent
d29e5def4b
commit
ceff6ef102
8 changed files with 84 additions and 26 deletions
|
@ -49,15 +49,24 @@ namespace SourceGit.UI {
|
|||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private async void Start(object sender, RoutedEventArgs e) {
|
||||
bool prune = chkPrune.IsChecked == true;
|
||||
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, prune, PopupManager.UpdateStatus));
|
||||
await Task.Run(() => repo.Fetch(null, subMod, prune, PopupManager.UpdateStatus));
|
||||
} else {
|
||||
var remote = combRemotes.SelectedItem as Git.Remote;
|
||||
await Task.Run(() => repo.Fetch(remote, prune, PopupManager.UpdateStatus));
|
||||
await Task.Run(() => repo.Fetch(remote, subMod, prune, PopupManager.UpdateStatus));
|
||||
}
|
||||
|
||||
PopupManager.Close(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue