mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-23 05:05:00 +00:00
enhance: add a checkbox to toggle Initialize & update submodules
after clone
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
3af6012561
commit
e784696058
5 changed files with 22 additions and 5 deletions
|
@ -53,6 +53,12 @@ namespace SourceGit.ViewModels
|
|||
set => SetProperty(ref _extraArgs, value);
|
||||
}
|
||||
|
||||
public bool InitAndUpdateSubmodules
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = true;
|
||||
|
||||
public Clone(string pageId)
|
||||
{
|
||||
_pageId = pageId;
|
||||
|
@ -128,11 +134,14 @@ namespace SourceGit.ViewModels
|
|||
}
|
||||
|
||||
// individually update submodule (if any)
|
||||
var submoduleList = new Commands.QuerySubmodules(path).Result();
|
||||
foreach (var submodule in submoduleList)
|
||||
if (InitAndUpdateSubmodules)
|
||||
{
|
||||
var update = new Commands.Submodule(path);
|
||||
update.Update(submodule.Path, true, true, false, SetProgressDescription);
|
||||
var submoduleList = new Commands.QuerySubmodules(path).Result();
|
||||
foreach (var submodule in submoduleList)
|
||||
{
|
||||
var update = new Commands.Submodule(path);
|
||||
update.Update(submodule.Path, true, true, false, SetProgressDescription);
|
||||
}
|
||||
}
|
||||
|
||||
CallUIThread(() =>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue