diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2018-03-01 19:14:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-01 19:14:48 +0100 |
commit | d8d17e72525d359044192b998b11926a4eecc2c4 (patch) | |
tree | d9607299f340ba352b0753679d2e5b1b0ce457ab /remote.go | |
parent | 4397264e391b45a8eac147cc7373189d55c640cc (diff) | |
parent | e850aea5005fdb2a74d7dcd3267dac4a3612df8a (diff) | |
download | go-git-d8d17e72525d359044192b998b11926a4eecc2c4.tar.gz |
Merge pull request #766 from mvdan/patches
Unused params, unused code, make Go tip's vet happy
Diffstat (limited to 'remote.go')
-rw-r--r-- | remote.go | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -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) { |