fix<*>: fix crash while creating branch with empty repository

This commit is contained in:
leo 2021-05-27 09:14:34 +08:00
parent 284e8077d6
commit f4237efaa2
4 changed files with 43 additions and 36 deletions

View file

@ -20,8 +20,10 @@ namespace SourceGit.Commands {
return Exec();
}
public bool Branch(string branch, string basedOn) {
Args = $"checkout -b {branch} {basedOn}";
public bool Branch(string branch, string basedOn, Action<string> onProgress) {
Args = $"checkout --progress -b {branch} {basedOn}";
TraitErrorAsOutput = true;
handler = onProgress;
return Exec();
}