diff options
author | Daniel Martí <mvdan@mvdan.cc> | 2018-03-01 17:00:05 +0000 |
---|---|---|
committer | Daniel Martí <mvdan@mvdan.cc> | 2018-03-01 17:12:48 +0000 |
commit | 65886144d1e19b563c4e8854ba1cd0d532fea532 (patch) | |
tree | a4bec25201f4f1f79498e810c0ea966e1fc388d8 /remote.go | |
parent | 886dc83f3ed518a78772055497bcc7d7621b468e (diff) | |
download | go-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.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) { |