mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-07 03:45:00 +00:00
enhance: update submodules individually (#1272)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
6cf1b20ea6
commit
3e530de9cc
4 changed files with 24 additions and 14 deletions
|
@ -68,8 +68,15 @@ namespace SourceGit.ViewModels
|
|||
}
|
||||
}
|
||||
|
||||
var rs = new Commands.Checkout(_repo.FullPath).Use(log).Branch(Branch, updateSubmodules);
|
||||
if (needPopStash)
|
||||
var rs = new Commands.Checkout(_repo.FullPath).Use(log).Branch(Branch);
|
||||
if (rs && updateSubmodules)
|
||||
{
|
||||
var submodules = new Commands.QuerySubmodules(_repo.FullPath).Result();
|
||||
foreach (var submodule in submodules)
|
||||
new Commands.Submodule(_repo.FullPath).Use(log).Update(submodule.Path, true, true, false);
|
||||
}
|
||||
|
||||
if (rs && needPopStash)
|
||||
rs = new Commands.Stash(_repo.FullPath).Use(log).Pop("stash@{0}");
|
||||
|
||||
log.Complete();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue