enhance: update submodules individually (#1272)

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2025-05-09 17:12:12 +08:00
parent 6cf1b20ea6
commit 3e530de9cc
No known key found for this signature in database
4 changed files with 24 additions and 14 deletions

View file

@ -101,7 +101,6 @@ namespace SourceGit.ViewModels
{
ProgressDescription = "Clone ...";
// Create a temp log.
var log = new CommandLog("Clone");
Use(log);
@ -139,11 +138,10 @@ namespace SourceGit.ViewModels
config.Set("remote.origin.sshkey", _sshKey);
}
// individually update submodule (if any)
if (InitAndUpdateSubmodules)
{
var submoduleList = new Commands.QuerySubmodules(path).Result();
foreach (var submodule in submoduleList)
var submodules = new Commands.QuerySubmodules(path).Result();
foreach (var submodule in submodules)
new Commands.Submodule(path).Use(log).Update(submodule.Path, true, true, false);
}