aboutsummaryrefslogtreecommitdiffstats
path: root/remote.go
diff options
context:
space:
mode:
authorDaniel Martí <mvdan@mvdan.cc>2018-03-01 17:00:05 +0000
committerDaniel Martí <mvdan@mvdan.cc>2018-03-01 17:12:48 +0000
commit65886144d1e19b563c4e8854ba1cd0d532fea532 (patch)
treea4bec25201f4f1f79498e810c0ea966e1fc388d8 /remote.go
parent886dc83f3ed518a78772055497bcc7d7621b468e (diff)
downloadgo-git-65886144d1e19b563c4e8854ba1cd0d532fea532.tar.gz
remove unused result parameter from objectsToPush
It always returns a nil error. Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
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) {