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

Projects
None yet
2 participants
@MikeMcQuaid
Copy link
Member

MikeMcQuaid commented Dec 15, 2016

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

This comment has been minimized.

Copy link
Member

MikeMcQuaid commented Dec 18, 2016

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

update-reset: add new command.
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 force-pushed the MikeMcQuaid:update-reset-command branch from cc2938d to d21f695 Dec 18, 2016

@ilovezfs

This comment has been minimized.

Copy link
Contributor

ilovezfs commented Dec 19, 2016

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

This comment has been minimized.

Copy link
Member

MikeMcQuaid commented Dec 19, 2016

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

This comment has been minimized.

Copy link
Member

MikeMcQuaid commented Dec 20, 2016

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

@ilovezfs

This comment has been minimized.

Copy link
Contributor

ilovezfs commented Dec 20, 2016

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

3 checks passed

codecov/patch Coverage not affected when comparing 201b45d...d21f695
Details
codecov/project Absolute coverage decreased by -0.01% but relative coverage increased by +36.85% compared to 201b45d
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@MikeMcQuaid MikeMcQuaid deleted the MikeMcQuaid:update-reset-command branch 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.