diff options
author | Oleg Kovalov <iamolegkovalov@gmail.com> | 2020-07-06 17:40:53 +0200 |
---|---|---|
committer | Oleg Kovalov <iamolegkovalov@gmail.com> | 2020-07-06 17:40:53 +0200 |
commit | a99446e290f038900b893e21362c6ff766c30f5e (patch) | |
tree | 8c9eca0445a0bf31ef57840c3950f923d5dc27b8 /remote.go | |
parent | a9899594dfdde8bbfdf35fc7e8c2fc3ec5aa7fdb (diff) | |
download | go-git-a99446e290f038900b893e21362c6ff766c30f5e.tar.gz |
Minor linter fixes
Diffstat (limited to 'remote.go')
-rw-r--r-- | remote.go | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -498,10 +498,8 @@ func (r *Remote) deleteReferences(rs config.RefSpec, if _, ok := refsDict[rs.Dst(ref.Name()).String()]; ok { return nil } - } else { - if rs.Dst("") != ref.Name() { - return nil - } + } else if rs.Dst("") != ref.Name() { + return nil } cmd := &packp.Command{ @@ -1046,12 +1044,11 @@ func (r *Remote) List(o *ListOptions) (rfs []*plumbing.Reference, err error) { } func objectsToPush(commands []*packp.Command) []plumbing.Hash { - var objects []plumbing.Hash + objects := make([]plumbing.Hash, len(commands)) for _, cmd := range commands { if cmd.New == plumbing.ZeroHash { continue } - objects = append(objects, cmd.New) } return objects |