From 65886144d1e19b563c4e8854ba1cd0d532fea532 Mon Sep 17 00:00:00 2001 From: Daniel Martí Date: Thu, 1 Mar 2018 17:00:05 +0000 Subject: remove unused result parameter from objectsToPush MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It always returns a nil error. Signed-off-by: Daniel Martí --- remote.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'remote.go') diff --git a/remote.go b/remote.go index 8828e3f..8db645c 100644 --- a/remote.go +++ b/remote.go @@ -130,10 +130,7 @@ func (r *Remote) PushContext(ctx context.Context, o *PushOptions) error { return NoErrAlreadyUpToDate } - objects, err := objectsToPush(req.Commands) - if err != nil { - return err - } + objects := objectsToPush(req.Commands) haves, err := referencesToHashes(remoteRefs) if err != nil { @@ -907,7 +904,7 @@ func (r *Remote) List(o *ListOptions) ([]*plumbing.Reference, error) { return resultRefs, nil } -func objectsToPush(commands []*packp.Command) ([]plumbing.Hash, error) { +func objectsToPush(commands []*packp.Command) []plumbing.Hash { var objects []plumbing.Hash for _, cmd := range commands { if cmd.New == plumbing.ZeroHash { @@ -916,8 +913,7 @@ func objectsToPush(commands []*packp.Command) ([]plumbing.Hash, error) { objects = append(objects, cmd.New) } - - return objects, nil + return objects } func referencesToHashes(refs storer.ReferenceStorer) ([]plumbing.Hash, error) { -- cgit