refactor: rewrite checkout/create branch with submodules

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2025-05-09 17:51:46 +08:00
parent e446e97f28
commit 0f6c8976af
No known key found for this signature in database
8 changed files with 136 additions and 65 deletions

View file

@ -141,8 +141,8 @@ namespace SourceGit.ViewModels
if (InitAndUpdateSubmodules)
{
var submodules = new Commands.QuerySubmodules(path).Result();
foreach (var submodule in submodules)
new Commands.Submodule(path).Use(log).Update(submodule.Path, true, true, false);
if (submodules.Count > 0)
new Commands.Submodule(path).Use(log).Update(submodules, true, true, false);
}
log.Complete();