mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 12:15:00 +00:00
feature<GitFlow>: add an option to keep branch after finish
This commit is contained in:
parent
524eb8ef6d
commit
0f38b157e2
5 changed files with 23 additions and 5 deletions
|
@ -50,16 +50,17 @@ namespace SourceGit.Commands {
|
|||
Exec();
|
||||
}
|
||||
|
||||
public void Finish(Models.GitFlowBranchType type, string name) {
|
||||
public void Finish(Models.GitFlowBranchType type, string name, bool keepBranch) {
|
||||
var option = keepBranch ? "-k" : string.Empty;
|
||||
switch (type) {
|
||||
case Models.GitFlowBranchType.Feature:
|
||||
Args = $"flow feature finish {name}";
|
||||
Args = $"flow feature finish {option} {name}";
|
||||
break;
|
||||
case Models.GitFlowBranchType.Release:
|
||||
Args = $"flow release finish {name}";
|
||||
Args = $"flow release finish {option} {name}";
|
||||
break;
|
||||
case Models.GitFlowBranchType.Hotfix:
|
||||
Args = $"flow hotfix finish {name}";
|
||||
Args = $"flow hotfix finish {option} {name}";
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue