Merge pull request #105 from infosiftr/explicit-full-gitcommit

Enforce that `GitCommit` must be a *full* commit hash
This commit is contained in:
yosifkit 2024-08-13 12:58:32 -07:00 committed by GitHub
commit 7afe152f6d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@ import (
) )
var ( var (
GitCommitRegex = regexp.MustCompile(`^[0-9a-f]{1,64}$`) GitCommitRegex = regexp.MustCompile(`^([0-9a-f]{40}|[0-9a-f]{64})$`)
GitFetchRegex = regexp.MustCompile(`^refs/(heads|tags)/[^*?:]+$`) GitFetchRegex = regexp.MustCompile(`^refs/(heads|tags)/[^*?:]+$`)
// https://github.com/docker/distribution/blob/v2.7.1/reference/regexp.go#L37 // https://github.com/docker/distribution/blob/v2.7.1/reference/regexp.go#L37