From 3dd93f5533f6634ae334d097a5daa8d38beb6d18 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Thu, 16 Nov 2017 00:04:07 -0500 Subject: vendor: update github.com/gogits/git-module --- vendor/github.com/gogits/git-module/git.go | 2 +- vendor/github.com/gogits/git-module/repo_branch.go | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'vendor/github.com') diff --git a/vendor/github.com/gogits/git-module/git.go b/vendor/github.com/gogits/git-module/git.go index 10673a90..414d67cd 100644 --- a/vendor/github.com/gogits/git-module/git.go +++ b/vendor/github.com/gogits/git-module/git.go @@ -10,7 +10,7 @@ import ( "time" ) -const _VERSION = "0.6.3" +const _VERSION = "0.6.4" func Version() string { return _VERSION diff --git a/vendor/github.com/gogits/git-module/repo_branch.go b/vendor/github.com/gogits/git-module/repo_branch.go index a5bf11de..de3f6ca1 100644 --- a/vendor/github.com/gogits/git-module/repo_branch.go +++ b/vendor/github.com/gogits/git-module/repo_branch.go @@ -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") -- cgit v1.2.3