From 95967a9e4d8ce3ac1060359d18c5584d211763e9 Mon Sep 17 00:00:00 2001 From: Oleg Kovalov Date: Tue, 7 Jul 2020 23:22:24 +0200 Subject: fix slice capacity --- remote.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'remote.go') 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 -- cgit