From ed7d84f846786d8100b96eb596c4e399f17801af Mon Sep 17 00:00:00 2001 From: Benoit Gagnon Date: Thu, 24 Oct 2019 11:08:24 -0400 Subject: [PATCH] update comments to reflect git install changes Signed-off-by: Benoit Gagnon --- pkg/git.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkg/git.go b/pkg/git.go index 3d4859a..46e505d 100644 --- a/pkg/git.go +++ b/pkg/git.go @@ -168,12 +168,11 @@ func (p *GitPackage) Install(ctx context.Context, name, dir, version string) (st defer os.RemoveAll(tmpDir) // Optimization for GitHub sources: download a tarball archive of the requested - // version instead of cloning the entire repository. The SHA1 is discovered through - // the ETag header included in the response. + // version instead of cloning the entire repository. isGitHubRemote, err := regexp.MatchString(`^(https|ssh)://github\.com/.+$`, p.Source.Remote) if isGitHubRemote { - // Let git ls-remote decide if "version" is a ref or a SHA1 in the unlikely - // but possible event that a ref is exactly 40 hex characters + // Let git ls-remote decide if "version" is a ref or a commit SHA in the unlikely + // but possible event that a ref is comprised of 40 or more hex characters commitSha, err := remoteResolveRef(ctx, p.Source.Remote, version) // If the ref resolution failed and "version" looks like a SHA,