Repository navigation
formula: extract commit for goreleaser flags - #24163
Merged
Merged
Conversation
This allows obtaining the git commit without needing to use a git clone. It avoids using unpack_strategy which is significantly slower due to unpacking entire tarball and extra disk writes impact hardware lifespan.
Contributor
There was a problem hiding this comment.
Copilot review overview
馃煛 Changes recommended
Two unresolved findings remain in formula.rb, including one critical issue.
Review effort: Lite
Findings: 1
Open (2)
What changed in this PR
Improves GoReleaser commit metadata by extracting commits from VCS sources and Git archives.
Changes:
- Added tarball commit extraction.
- Updated GoReleaser commit selection and fallbacks.
- Added utility and formula test coverage.
| File | Summary |
|---|---|
Library/鈥婬omebrew/鈥媢tils/鈥媑it.rb |
Adds Git archive commit extraction. |
Library/鈥婬omebrew/鈥媡est/鈥媢tils/鈥媑it_spec.rb |
Tests archive commit extraction. |
Library/鈥婬omebrew/鈥媡est/鈥媐ormula_spec.rb |
Tests GoReleaser commit selection. |
Library/鈥婬omebrew/鈥媐ormula.rb |
Integrates revision, archive, repository, and fallback detection. Unresolved findings: moderate (4 votes) URL-extension handling issue and critical (1 vote) unsafe Git failure handling. |
馃挕 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
cho-m
marked this pull request as draft
October 4, 2026 19:24
Member
Author
|
Draft until I fix the test on Linux runners. |
cho-m
commented
Oct 4, 2026
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
cho-m
force-pushed
the
get_tar_commit_id
branch
from
October 4, 2026 23:31
e3239b6 to
8097398
Compare
cho-m
marked this pull request as ready for review
October 4, 2026 23:31
MikeMcQuaid
approved these changes
Oct 5, 2026
MikeMcQuaid
left a comment
Member
There was a problem hiding this comment.
Good to self-merge when you're happy!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


This provides more accurate data for
:goreleaserbuilds and theUtils::Git.get_tar_commit_idcan be used by other formulae to switch from git clone to git archives (reducing disk/network IO).For
:goreleaser, now populating main.commit as follows:git get-tar-commit-idasgit archiveincludes commit inside PAX headerI did not use UnpackStrategy as there is a significant cost given 1kB vs MB/GB unpack time and the cost of SSD disk writes which impacts lifespan.
brew benchmarkresults.brewcommands to reproduce the bug?brew lgtm(style, typechecking and tests) locally?n/a