From 0d0fd799d205f79073b69db9a4bac451e53508b2 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 bf88e884d..463af1d4e 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)