Skip to content

Commit 37a65be

Browse files
andrzej-kaczmareksjanc
authored andcommitted
Add '--no-single-branch' to shallow clone for Git repos
This is the same as fdc74bd but for "pure" Git repos.
1 parent fdc74bd commit 37a65be

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
@@ -1052,7 +1052,7 @@ func (gd *GitDownloader) Clone(commit string, dstPath string) error {
10521052
}
10531053

10541054
if util.ShallowCloneDepth > 0 {
1055-
cmd = append(cmd, "--depth", strconv.Itoa(util.ShallowCloneDepth))
1055+
cmd = append(cmd, "--depth", strconv.Itoa(util.ShallowCloneDepth), "--no-single-branch")
10561056
}
10571057

10581058
cmd = append(cmd, gd.Url, dstPath)

0 commit comments

Comments
 (0)