diff --git a/pkg/cmd/repo/garden/http.go b/pkg/cmd/repo/garden/http.go index ff7f47fe07a..9c6d018b22d 100644 --- a/pkg/cmd/repo/garden/http.go +++ b/pkg/cmd/repo/garden/http.go @@ -53,7 +53,7 @@ func getCommits(client *http.Client, repo ghrepo.Interface, maxCommits int) ([]* }) } link := resp.Header["Link"] - if !strings.Contains(link[0], "last") { + if len(link) > 0 && !strings.Contains(link[0], "last") { paginating = false } page++