vendor: update github.com/gogits/git-module

This commit is contained in:
Unknwon
2017-11-16 00:04:07 -05:00
parent 181dc5d75e
commit 3dd93f5533
5 changed files with 14 additions and 9 deletions

View File

@@ -10,7 +10,7 @@ import (
"time"
)
const _VERSION = "0.6.3"
const _VERSION = "0.6.4"
func Version() string {
return _VERSION

View File

@@ -86,8 +86,8 @@ type DeleteBranchOptions struct {
Force bool
}
// DeleteBranch delete a branch by name on repository.
func (repo *Repository) DeleteBranch(name string, opts DeleteBranchOptions) error {
// DeleteBranch deletes a branch from given repository path.
func DeleteBranch(repoPath, name string, opts DeleteBranchOptions) error {
cmd := NewCommand("branch")
if opts.Force {
@@ -97,11 +97,16 @@ func (repo *Repository) DeleteBranch(name string, opts DeleteBranchOptions) erro
}
cmd.AddArguments(name)
_, err := cmd.RunInDir(repo.Path)
_, err := cmd.RunInDir(repoPath)
return err
}
// DeleteBranch deletes a branch from repository.
func (repo *Repository) DeleteBranch(name string, opts DeleteBranchOptions) error {
return DeleteBranch(repo.Path, name, opts)
}
// AddRemote adds a new remote to repository.
func (repo *Repository) AddRemote(name, url string, fetch bool) error {
cmd := NewCommand("remote", "add")