feature<Dashboard>: add menu to unset upstream and cancel tracking when deleting related remote branches

This commit is contained in:
Jai 2021-09-07 09:36:06 +08:00
parent f041adb2b3
commit 584bac74f9
5 changed files with 37 additions and 7 deletions

View file

@ -21,7 +21,12 @@ namespace SourceGit.Commands {
}
public void SetUpstream(string upstream) {
Args = $"branch {target} -u {upstream}";
Args = $"branch {target} ";
if (string.IsNullOrEmpty(upstream)) {
Args += "--unset-upstream";
} else {
Args += $"-u {upstream}";
}
Exec();
}