diff options
author | Santiago M. Mola <santi@mola.io> | 2016-12-19 23:36:44 +0100 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2016-12-19 23:36:44 +0100 |
commit | 90d67bb648ae32d5b1a0f7b1af011da6dfb24315 (patch) | |
tree | fc8c14e82974be6ff49e842328ec3206ebf1b4c2 /plumbing/transport/internal | |
parent | 725ade0de6f60549e65cc4d94094b1f5ed48587f (diff) | |
download | go-git-90d67bb648ae32d5b1a0f7b1af011da6dfb24315.tar.gz |
remote: add Push (#178)
* remote: add Push.
* add Push method to Remote.
* add method Push to Repository.
* examples: add push example.
* requested changes
* add tests, fixes
Diffstat (limited to 'plumbing/transport/internal')
-rw-r--r-- | plumbing/transport/internal/common/common.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plumbing/transport/internal/common/common.go b/plumbing/transport/internal/common/common.go index f6d1249..17c473e 100644 --- a/plumbing/transport/internal/common/common.go +++ b/plumbing/transport/internal/common/common.go @@ -281,8 +281,8 @@ func (s *session) SendPack(req *packp.ReferenceUpdateRequest) (*packp.ReportStat return nil, err } - if !report.Ok() { - return report, fmt.Errorf("report status: %s", report.UnpackStatus) + if err := report.Error(); err != nil { + return report, err } return report, s.Command.Wait() |