Delete local branch if it exists (#6497)

Signed-off-by: jolheiser <john.olheiser@gmail.com>
This commit is contained in:
John Olheiser authored and Lauris BH committed 2019-04-08 08:08:02 +03:00
1 parent 49b2f45f75
commit aa02463ded
2 files changed
+38

No files matched your search

+6
View File
@@ -71,6 +71,12 @@ func DeleteBranchPost(ctx *context.Context) {
return
}
// Delete branch in local copy if it exists
if err := ctx.Repo.Repository.DeleteLocalBranch(branchName); err != nil {
ctx.Flash.Error(ctx.Tr("repo.branch.deletion_failed", branchName))
return
}
ctx.Flash.Success(ctx.Tr("repo.branch.deletion_success", branchName))
}