mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 04:04:59 +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
|
@ -11,17 +11,15 @@ namespace SourceGit.Commands
|
|||
Context = repo;
|
||||
}
|
||||
|
||||
public bool Branch(string branch, bool recurseSubmodules)
|
||||
public bool Branch(string branch)
|
||||
{
|
||||
var options = recurseSubmodules ? "--recurse-submodules" : string.Empty;
|
||||
Args = $"checkout {options} --progress {branch}";
|
||||
Args = $"checkout --force --progress {branch}";
|
||||
return Exec();
|
||||
}
|
||||
|
||||
public bool Branch(string branch, string basedOn, bool recurseSubmodules)
|
||||
public bool Branch(string branch, string basedOn)
|
||||
{
|
||||
var options = recurseSubmodules ? "--recurse-submodules" : string.Empty;
|
||||
Args = $"checkout {options} --progress -b {branch} {basedOn}";
|
||||
Args = $"checkout --force --progress -b {branch} {basedOn}";
|
||||
return Exec();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue