diff options
author | Unknwon <u@gogs.io> | 2018-08-17 23:15:26 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2018-08-17 23:15:26 +0800 |
commit | ba7b2cc1f68cd374576b186784d784b03df033f1 (patch) | |
tree | 52de6eb9d4893e62c3c1b0ca73c829111d7cd4c4 /vendor/github.com/gogs/git-module/repo.go | |
parent | ac73d43444e8332015e34bfe0230dfe04edff3c3 (diff) |
vendor: update github.com/gogs/git-module
Diffstat (limited to 'vendor/github.com/gogs/git-module/repo.go')
-rw-r--r-- | vendor/github.com/gogs/git-module/repo.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/vendor/github.com/gogs/git-module/repo.go b/vendor/github.com/gogs/git-module/repo.go index aef9f385..1fd339dd 100644 --- a/vendor/github.com/gogs/git-module/repo.go +++ b/vendor/github.com/gogs/git-module/repo.go @@ -176,10 +176,15 @@ func Pull(repoPath string, opts PullRemoteOptions) error { return err } +// PushWithEnvs pushs local commits to given remote branch with given environment variables. +func PushWithEnvs(repoPath, remote, branch string, envs []string) error { + _, err := NewCommand("push", remote, branch).AddEnvs(envs...).RunInDir(repoPath) + return err +} + // Push pushs local commits to given remote branch. func Push(repoPath, remote, branch string) error { - _, err := NewCommand("push", remote, branch).RunInDir(repoPath) - return err + return PushWithEnvs(repoPath, remote, branch, nil) } type CheckoutOptions struct { |