From 78b99d2fda566160f79324e183127e7cfc1ba50b Mon Sep 17 00:00:00 2001 From: Andrzej Kaczmarek Date: Tue, 12 Nov 2024 10:49:30 +0100 Subject: [PATCH] Add '--no-single-branch' to shallow clone Shallow clone should still download all branches and tags to make sure we can find proper version. This fixes regression introduced by 1dc2b53e as previously after shallow clone we still run fetch on newly cloned repo which updated branches and tags. --- newt/downloader/downloader.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/newt/downloader/downloader.go b/newt/downloader/downloader.go index bf88e884da..463af1d4e8 100644 --- a/newt/downloader/downloader.go +++ b/newt/downloader/downloader.go @@ -947,7 +947,7 @@ func (gd *GithubDownloader) Clone(commit string, dstPath string) error { } if util.ShallowCloneDepth > 0 { - cmd = append(cmd, "--depth", strconv.Itoa(util.ShallowCloneDepth)) + cmd = append(cmd, "--depth", strconv.Itoa(util.ShallowCloneDepth), "--no-single-branch") } cmd = append(cmd, url, dstPath)