aboutsummaryrefslogtreecommitdiffstats
path: root/remote.go
diff options
context:
space:
mode:
authorOleg Kovalov <iamolegkovalov@gmail.com>2020-07-07 23:22:24 +0200
committerOleg Kovalov <iamolegkovalov@gmail.com>2020-07-07 23:22:24 +0200
commit95967a9e4d8ce3ac1060359d18c5584d211763e9 (patch)
treecbb016f58be3df2899a2873d80540f814163a5bc /remote.go
parenta99446e290f038900b893e21362c6ff766c30f5e (diff)
downloadgo-git-95967a9e4d8ce3ac1060359d18c5584d211763e9.tar.gz
fix slice capacity
Diffstat (limited to 'remote.go')
-rw-r--r--remote.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/remote.go b/remote.go
index bc370e6..3c617c7 100644
--- a/remote.go
+++ b/remote.go
@@ -1044,7 +1044,7 @@ func (r *Remote) List(o *ListOptions) (rfs []*plumbing.Reference, err error) {
}
func objectsToPush(commands []*packp.Command) []plumbing.Hash {
- objects := make([]plumbing.Hash, len(commands))
+ objects := make([]plumbing.Hash, 0, len(commands))
for _, cmd := range commands {
if cmd.New == plumbing.ZeroHash {
continue