1
0
Fork 0
forked from forgejo/forgejo

update code.gitea.io/git in vendor to fix #2245 (#2250)

This commit is contained in:
Lauris BH 2017-08-03 16:48:36 +03:00 committed by Lunny Xiao
parent 4c54139afc
commit a4ca54425f
2 changed files with 7 additions and 5 deletions

View file

@ -86,10 +86,12 @@ type DeleteBranchOptions struct {
// DeleteBranch delete a branch by name on repository.
func (repo *Repository) DeleteBranch(name string, opts DeleteBranchOptions) error {
cmd := NewCommand("branch", "-d")
cmd := NewCommand("branch")
if opts.Force {
cmd.AddArguments("-f")
cmd.AddArguments("-D")
} else {
cmd.AddArguments("-d")
}
cmd.AddArguments(name)