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

update/update-reset: warn when no origin remote #13187

Merged
merged 2 commits into from Apr 26, 2022

Conversation

maxim-belkin
Copy link
Member

  • 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?

Explanation of changes

Current situation with update.sh & update-reset.sh:

Upon creating a new tap and before adding remote 'origin' to it, running brew update produces multiple cryptic Git error messages. This change converts these cryptic Git messages into clear warnings about absent remote 'origin'.

How to test:

  1. Create a new tap using brew tap-new
  2. Run brew update

I also noticed that variable "option" in homebrew-update-reset was not declared as "local", so I went ahead and fixed it.

@BrewTestBot
Copy link
Member

Review period will end on 2022-04-26 at 12:01:51 UTC.

@BrewTestBot BrewTestBot added the waiting for feedback Merging is blocked until sufficient time has passed for review label Apr 25, 2022
Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

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

Nice work so far!

Library/Homebrew/cmd/update.sh Outdated Show resolved Hide resolved
Library/Homebrew/cmd/update-reset.sh Outdated Show resolved Hide resolved
Library/Homebrew/cmd/update.sh Outdated Show resolved Hide resolved
@maxim-belkin
Copy link
Member Author

Thanks for the suggestions, Mike!

@MikeMcQuaid MikeMcQuaid added the critical Critical change which should be shipped as soon as possible. label Apr 25, 2022
@MikeMcQuaid
Copy link
Member

Thanks again @maxim-belkin!

@BrewTestBot BrewTestBot removed the waiting for feedback Merging is blocked until sufficient time has passed for review label Apr 25, 2022
@BrewTestBot
Copy link
Member

BrewTestBot commented Apr 25, 2022

Review period ended.

@maxim-belkin
Copy link
Member Author

@MikeMcQuaid, I don't think that changes introduced in this PR can cause the failure observed in "CI/test everything". I re-ran the workflow once and the error message changed. Should I rebase it or re-run the workflow again?

@MikeMcQuaid
Copy link
Member

@maxim-belkin Try to rebase and try again. If it still fails: you may have accidentally broken brew update.

maxim-belkin and others added 2 commits April 26, 2022 08:35
Current situation with update.sh & update-reset.sh:

Upon creating a new tap and before adding remote 'origin' to it,
running `brew update` produces multiple cryptic error messages.
This change converts these cryptic Git messages into clear warnings
about absent remote 'origin'.

How to test:
1. Create a new tap using `brew tap-new`
2. Run `brew update`
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
@MikeMcQuaid MikeMcQuaid merged commit b6e8097 into Homebrew:master Apr 26, 2022
@maxim-belkin maxim-belkin deleted the creating-new-tap branch April 26, 2022 16:35
@maxim-belkin
Copy link
Member Author

🎉

@github-actions github-actions bot added the outdated PR was locked due to age label May 27, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
critical Critical change which should be shipped as soon as possible. outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants