From 0fd38888876effedd1c7cc3db872450b41b9e234 Mon Sep 17 00:00:00 2001 From: rusttech Date: Wed, 2 Oct 2024 13:35:12 +0800 Subject: [PATCH] fix: fix slice init length --- commands/command_fetch.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/command_fetch.go b/commands/command_fetch.go index 3ab64160ba..4bbafc6c15 100644 --- a/commands/command_fetch.go +++ b/commands/command_fetch.go @@ -76,7 +76,7 @@ func fetchCommand(cmd *cobra.Command, args []string) { } if len(args) > 1 { - refShas := make([]string, len(refs)) + refShas := make([]string, 0, len(refs)) for _, ref := range refs { refShas = append(refShas, ref.Sha) }