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
diagnostic: add check for broken taps #11473
Conversation
Review period will end on 2021-06-01 at 17:12:08 UTC. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
love this idea, nice work so far @gromgit!
Detect half-baked core taps that show up on a fairly regular basis (e.g. Homebrew#11465). The logic is simple enough: Since an improper tap wouldn't have a complete Git config, and is always somewhere below `HOMEBREW_REPOSITORY`, any Git operation would look at the Brew repo instead. We simply need to test for any of: 1. Empty tap origin 2. Empty tap HEAD 3. Tap HEAD == Brew HEAD
c6b1019
to
c7bbb90
Compare
@MikeMcQuaid, thanks much for the comprehensive review! I've refactored my changes based on your last comment:
It's certainly more streamlined now. 😁 |
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
bf71a5f
to
1cf8b43
Compare
Review period ended. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work here as usual @gromgit!
Detect half-baked core taps that show up on a fairly regular basis (e.g. #11465, #11243).
A half-baked tap wouldn't have a complete Git config, and is always somewhere below
HOMEBREW_REPOSITORY
, so any Git operation would refer to the Brew repo instead. We simply need to test for any of:brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?