aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/code.gitea.io/git/repo_branch.go
diff options
context:
space:
mode:
authorZsombor <gzsombor@users.noreply.github.com>2017-02-05 15:43:28 +0100
committerLunny Xiao <xiaolunwen@gmail.com>2017-02-05 22:43:28 +0800
commite388db311b63d7b1baf640f1aece74e86ffd665f (patch)
tree226d9ede379ddef6f5ccf9bc2e991a7a89511b14 /vendor/code.gitea.io/git/repo_branch.go
parentf35b20b04212b2085d44d34933c04c4fd30d3a08 (diff)
downloadgitea-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.go10
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")