feat(*): 为 Pull、Fetch、Push 增加 --recurse-submodules 选项参数

This commit is contained in:
ZCShou 2020-07-24 19:52:47 +08:00
parent d29e5def4b
commit ceff6ef102
8 changed files with 84 additions and 26 deletions

View file

@ -76,8 +76,17 @@ 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), PopupManager.UpdateStatus, rebase, autoStash));
await Task.Run(() => repo.Pull(remote, branch.Substring(branch.IndexOf('/')+1), subMod, PopupManager.UpdateStatus, rebase, autoStash));
PopupManager.Close(true);
}