mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 04:04:59 +00:00
feature: make --recurse-submdoules
an option while trying to checkout branch with submodules (#1272)
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
054bbf7e0c
commit
df29edd8f0
10 changed files with 80 additions and 11 deletions
|
@ -11,15 +11,17 @@ namespace SourceGit.Commands
|
|||
Context = repo;
|
||||
}
|
||||
|
||||
public bool Branch(string branch)
|
||||
public bool Branch(string branch, bool recurseSubmodules)
|
||||
{
|
||||
Args = $"checkout --recurse-submodules --progress {branch}";
|
||||
var options = recurseSubmodules ? "--recurse-submodules" : string.Empty;
|
||||
Args = $"checkout {options} --progress {branch}";
|
||||
return Exec();
|
||||
}
|
||||
|
||||
public bool Branch(string branch, string basedOn)
|
||||
public bool Branch(string branch, string basedOn, bool recurseSubmodules)
|
||||
{
|
||||
Args = $"checkout --recurse-submodules --progress -b {branch} {basedOn}";
|
||||
var options = recurseSubmodules ? "--recurse-submodules" : string.Empty;
|
||||
Args = $"checkout {options} --progress -b {branch} {basedOn}";
|
||||
return Exec();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue