diff options
author | Zsombor <gzsombor@users.noreply.github.com> | 2017-02-05 15:43:28 +0100 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-02-05 22:43:28 +0800 |
commit | e388db311b63d7b1baf640f1aece74e86ffd665f (patch) | |
tree | 226d9ede379ddef6f5ccf9bc2e991a7a89511b14 /vendor/code.gitea.io/git/repo_branch.go | |
parent | f35b20b04212b2085d44d34933c04c4fd30d3a08 (diff) | |
download | gitea-e388db311b63d7b1baf640f1aece74e86ffd665f.tar.gz gitea-e388db311b63d7b1baf640f1aece74e86ffd665f.zip |
Add checkbox to search for all the branches by commit message (#813)
and updating the vendor directory
Diffstat (limited to 'vendor/code.gitea.io/git/repo_branch.go')
-rw-r--r-- | vendor/code.gitea.io/git/repo_branch.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/vendor/code.gitea.io/git/repo_branch.go b/vendor/code.gitea.io/git/repo_branch.go index f2e9f43cdb..8366b68332 100644 --- a/vendor/code.gitea.io/git/repo_branch.go +++ b/vendor/code.gitea.io/git/repo_branch.go @@ -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") |