1
0
Fork 0
forked from forgejo/forgejo

Add checkbox to search for all the branches by commit message (#813)

and updating the vendor directory
This commit is contained in:
Zsombor 2017-02-05 15:43:28 +01:00 committed by Lunny Xiao
parent f35b20b042
commit e388db311b
9 changed files with 39 additions and 18 deletions

View file

@ -102,6 +102,16 @@ func (repo *Repository) DeleteBranch(name string, opts DeleteBranchOptions) erro
return err
}
// CreateBranch create a new branch
func (repo *Repository) CreateBranch(branch, newBranch string) error {
cmd := NewCommand("branch")
cmd.AddArguments(branch, newBranch)
_, err := cmd.RunInDir(repo.Path)
return err
}
// AddRemote adds a new remote to repository.
func (repo *Repository) AddRemote(name, url string, fetch bool) error {
cmd := NewCommand("remote", "add")