diff options
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 { |