Remove redundant check on depth

This commit is contained in:
Elara 2022-09-27 20:00:37 -07:00
parent ab1826f523
commit 16bb936db7
1 changed files with 1 additions and 4 deletions

View File

@ -109,10 +109,7 @@ func Get(ctx context.Context, opts GetOptions) error {
cloneOpts := &git.CloneOptions{ cloneOpts := &git.CloneOptions{
URL: src.String(), URL: src.String(),
Progress: os.Stderr, Progress: os.Stderr,
} Depth: depth,
if depth != 0 {
cloneOpts.Depth = depth
} }
repo, err := git.PlainCloneContext(ctx, dstDir, false, cloneOpts) repo, err := git.PlainCloneContext(ctx, dstDir, false, cloneOpts)