diff --git a/src/Commands/Checkout.cs b/src/Commands/Checkout.cs index 25f93e89..306d62ff 100644 --- a/src/Commands/Checkout.cs +++ b/src/Commands/Checkout.cs @@ -14,7 +14,7 @@ namespace SourceGit.Commands public bool Branch(string branch, Action onProgress) { - Args = $"checkout --progress {branch}"; + Args = $"checkout --recurse-submodules --progress {branch}"; TraitErrorAsOutput = true; _outputHandler = onProgress; return Exec(); @@ -22,7 +22,7 @@ namespace SourceGit.Commands public bool Branch(string branch, string basedOn, Action onProgress) { - Args = $"checkout --progress -b {branch} {basedOn}"; + Args = $"checkout --recurse-submodules --progress -b {branch} {basedOn}"; TraitErrorAsOutput = true; _outputHandler = onProgress; return Exec(); @@ -30,7 +30,7 @@ namespace SourceGit.Commands public bool UseTheirs(List files) { - StringBuilder builder = new StringBuilder(); + var builder = new StringBuilder(); builder.Append("checkout --theirs --"); foreach (var f in files) { @@ -44,7 +44,7 @@ namespace SourceGit.Commands public bool UseMine(List files) { - StringBuilder builder = new StringBuilder(); + var builder = new StringBuilder(); builder.Append("checkout --ours --"); foreach (var f in files) { @@ -70,20 +70,6 @@ namespace SourceGit.Commands return Exec(); } - public bool Files(List files) - { - StringBuilder builder = new StringBuilder(); - builder.Append("checkout -f -q --"); - foreach (var f in files) - { - builder.Append(" \""); - builder.Append(f); - builder.Append("\""); - } - Args = builder.ToString(); - return Exec(); - } - protected override void OnReadline(string line) { _outputHandler?.Invoke(line);