enhance: add a checkbox to toggle Initialize & update submodules after clone

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2025-02-06 10:19:43 +08:00
parent 3af6012561
commit e784696058
No known key found for this signature in database
5 changed files with 22 additions and 5 deletions

View file

@ -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(() =>