Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforce that GitCommit must be a *full* commit hash #105

Merged
merged 1 commit into from
Aug 13, 2024

Conversation

tianon
Copy link
Member

@tianon tianon commented Aug 13, 2024

I thought this was already the behavior, but I guess it was relaxed because previous iterations of this validation had to apply to the older format where we'd been less meticulous about enforcing this. Since those are all gone now, we can safely update the validation to enforce that commit hashes must be fully qualified.

I thought this was already the behavior, but I guess it was relaxed because previous iterations of this validation had to apply to the older format where we'd been less meticulous about enforcing this.  Since those are all gone now, we can safely update the validation to enforce that commit hashes *must* be fully qualified.
@tianon tianon requested a review from yosifkit as a code owner August 13, 2024 18:28
@tianon
Copy link
Member Author

tianon commented Aug 13, 2024

Some validation against https://github.com/docker-library/official-images:

$ git log -1 --oneline --no-decorate
bb7a6a131 Merge pull request #17351 from yaooqinn/patch-1
$ grep --no-filename 'GitCommit:' -- library/* | cut -d: -f2 | xargs -n1 | sort -u | grep -vE '^.{40}$'
$ bashbrew --library library cat --all > /dev/null
$ 

Copy link

@whalelines whalelines left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doubly good to also eliminate the possibility of supplying a one-character hash

@yosifkit yosifkit merged commit 7afe152 into docker-library:master Aug 13, 2024
6 checks passed
@yosifkit yosifkit deleted the explicit-full-gitcommit branch August 13, 2024 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants