Skip to content

Commit 0d0fd79

Browse files
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 1dc2b53 as previously after shallow clone we still run fetch on newly cloned repo which updated branches and tags.
1 parent 1dc2b53 commit 0d0fd79

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

newt/downloader/downloader.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,7 @@ func (gd *GithubDownloader) Clone(commit string, dstPath string) error {
947947
}
948948

949949
if util.ShallowCloneDepth > 0 {
950-
cmd = append(cmd, "--depth", strconv.Itoa(util.ShallowCloneDepth))
950+
cmd = append(cmd, "--depth", strconv.Itoa(util.ShallowCloneDepth), "--no-single-branch")
951951
}
952952

953953
cmd = append(cmd, url, dstPath)

0 commit comments

Comments
 (0)