From 90d67bb648ae32d5b1a0f7b1af011da6dfb24315 Mon Sep 17 00:00:00 2001 From: "Santiago M. Mola" Date: Mon, 19 Dec 2016 23:36:44 +0100 Subject: 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 --- plumbing/transport/internal/common/common.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plumbing/transport/internal/common') 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() -- cgit