aboutsummaryrefslogtreecommitdiffstats
path: root/remote.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2018-03-01 19:14:48 +0100
committerGitHub <noreply@github.com>2018-03-01 19:14:48 +0100
commitd8d17e72525d359044192b998b11926a4eecc2c4 (patch)
treed9607299f340ba352b0753679d2e5b1b0ce457ab /remote.go
parent4397264e391b45a8eac147cc7373189d55c640cc (diff)
parente850aea5005fdb2a74d7dcd3267dac4a3612df8a (diff)
downloadgo-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.go10
1 files changed, 3 insertions, 7 deletions
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) {