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-reset: add new command. #1684

Merged
merged 1 commit into from Dec 20, 2016

Conversation

MikeMcQuaid
Copy link
Member

Add new brew update-reset command to provide a helpful troubleshooting fallback to fetch and reset all repositories. This could have lived in
brew update but it makes sense to avoid the complexity of sharing logic between these scripts and keeping this one simpler.

@MikeMcQuaid MikeMcQuaid added the in progress Maintainers are working on this label Dec 15, 2016
@MikeMcQuaid
Copy link
Member Author

@ilovezfs Any thoughts on this (the general approach; ignore failing CI)?

Add new `brew update-reset` command to provide a helpful troubleshooting
fallback to fetch and reset all repositories. This could have lived in
`brew update` but it makes sense to avoid the complexity of sharing
logic between these scripts and keeping this one simpler.
@ilovezfs
Copy link
Contributor

How is the use case here different from update -f? If an additional level of force is needed, why not make that another option to update rather than creating a whole new command?

Also, I think we can pretty much bet the house that this will cause people to lose work. Not sure how to dangle a neon sign around it indicating as such.

@MikeMcQuaid
Copy link
Member Author

How is the use case here different from update -f? If an additional level of force is needed, why not make that another option to update rather than creating a whole new command?

This will blindly reset everything and not put people back to their branch or keep their work. It's the update-reset-i-dont-know-git command, basically, that we often tell people to run manually. We can guard it against the HOMEBREW_DEVELOPER or homebrew.devcmdrun. It's not documented anywhere so I think people are unlikely to just randomly run it to see what happens.

Creating a new command is to avoid adding additional complexity to update.sh and to keep this super reliable and simple. It intentionally bypasses a bunch of our e.g. shim code etc. which could stop people being able to update.

@MikeMcQuaid
Copy link
Member Author

@ilovezfs Thoughts? I don't mind renaming this accordingly or making the checks suggested.

@ilovezfs
Copy link
Contributor

Nope, sounds fine to me. It will be good to have this. If we later decide to roll it into update as a --foo, that won't detract from the utility of having this now.

@MikeMcQuaid MikeMcQuaid merged commit 584fd64 into Homebrew:master Dec 20, 2016
@MikeMcQuaid MikeMcQuaid deleted the update-reset-command branch December 20, 2016 10:17
@MikeMcQuaid MikeMcQuaid removed the in progress Maintainers are working on this label Dec 20, 2016
@Homebrew Homebrew locked and limited conversation to collaborators May 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants