Skip to content

Commit

Permalink
Add '--no-single-branch' to shallow clone
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
andrzej-kaczmarek committed Nov 12, 2024
1 parent ff448b0 commit 78b99d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion newt/downloader/downloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 78b99d2

Please sign in to comment.