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

Simplify Tap#remote_repo. #16776

Merged
merged 1 commit into from
Mar 4, 2024
Merged

Conversation

reitermarkus
Copy link
Member

@reitermarkus reitermarkus commented Feb 29, 2024

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

Extracted from #16730 for easier review.

@apainintheneck
Copy link
Contributor

I'm not sure this is really simpler. It's a few less lines I guess.

@MikeMcQuaid
Copy link
Member

Agreed with @apainintheneck, this is worse as it actually introduces more branching logic despite being fewer lines. Passing on this, sorry.

@MikeMcQuaid MikeMcQuaid closed this Mar 1, 2024
@reitermarkus
Copy link
Member Author

reitermarkus commented Mar 1, 2024

It's needed to work with the signature of Tap#remote, which is added in a later commit in the original PR.

@reitermarkus reitermarkus reopened this Mar 1, 2024
@reitermarkus
Copy link
Member Author

Feel free to suggest an alternative that only calls remote once.

@MikeMcQuaid
Copy link
Member

Feel free to suggest an alternative that only calls remote once.

remote_repo = remote and then use that variable instead.

@apainintheneck
Copy link
Contributor

It's needed to work with the signature of Tap#remote, which is added in a later commit in the original PR.

In that case, I'm okay with whatever appeases the type system. That goes for other PR too.

@apainintheneck
Copy link
Contributor

@reitermarkus Maybe this shouldn't be a separate PR in that case though. It'd be easier to understand in context. That being said I appreciate you breaking up these in general PRs so they're easier to review.

@reitermarkus
Copy link
Member Author

If I change #remote, this cascades into a bunch of other changes that are needed, like this change here, so I extracted these first.

Library/Homebrew/tap.rb Outdated Show resolved Hide resolved
@MikeMcQuaid MikeMcQuaid merged commit 3a4eff9 into Homebrew:master Mar 4, 2024
26 checks passed
@MikeMcQuaid
Copy link
Member

Thanks @reitermarkus!

@reitermarkus reitermarkus deleted the tap-sig-1 branch March 4, 2024 15:39
@github-actions github-actions bot added the outdated PR was locked due to age label Apr 4, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants