Skip to content

Commit fdc74bd

Browse files
andrzej-kaczmareksjanc
authored andcommitted
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 ff448b0 commit fdc74bd

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)