aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/update.rb
AgeCommit message (Collapse)Author
2012-03-23Parse raw diff output in `brew update`Jack Nagel
Using each_cons() "works", but to report all changes correctly we need to look at the last elements even after we've looked at the last 3 consecutive elements. Instead, let's parse each line of the raw diff output using a regexp. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-22Detect and display renames in `brew update`Jack Nagel
Renamed formulae will cease to display as an add/delete pair and instead end up the in the "Renamed" section. In the future we should be able to take this information and use it to rename existing kegs during updates, allowing us to rename formulae without breaking upgrades. Renaming a formula requires renaming the class, so there will be at least one add/delete pair in the file. Thus, the similarity threshold for detecting renames is set at 85% to allow a little bit of content turnover without losing track of the rename. Closes #11158. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-22Use --verify when querying HEADJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-18Set MACOS_VERSION as 0 on non-OSX platforms.Mike McQuaid
2012-03-18Handle when formula are deleted from tapsMax Howell
The symlinks in Formula must be updated.
2012-03-16Link new tapped formula during brew updateMax Howell
Required me to spoil tap's code. All in the name of DRY! Alas!
2012-03-16`brew update` will update tapsMax Howell
2012-03-02update: disable git line ending conversionJack Nagel
If a user has set core.autocrlf = true (which shouldn't ever be used on OS X, but alas...), a subsequent `brew update` will check out files with CRLF line endings. Setting core.autocrlf = false in Homebrew's repo config will override this global setting, and let us check out files with their in-repository line endings. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-20Allow `brew update --rebase`Max Howell
2011-09-10Use HTTPS during `brew update`Jack Nagel
Closes #7527. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-08-31fix brew update treating command changes as deletionsMisty De Meo
`brew update` was treating all changes to internal commands as deletions due to a typo, resulting in spurious notifications of removed commands. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-08-31update: make `git pull` update origin/masterJack Nagel
Specify the refspec 'refs/heads/master:refs/remotes/origin/master' so that the remote-tracking branch origin/master gets update during `brew update` (git-pull updates remote-tracking branches when invoked like `git pull` or `git pull origin`, but not `git pull origin master`). Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-08-26Feature new/removed internal commandsMax Howell
Removed updated external commands, like seriously, who cares? We could add it back as if --verbose is set I guess but in all honesty, if nobody complains then nobody cared. # We removed many redundant comments Removed many redundant comments. Fixes #7191; though it could be fixed better.
2011-08-26Fix `brew update` after new install for real this time?Max Howell
Fixes #7220.
2011-08-25`brew update` uses origin rather than full URLMax Howell
This is more flexible for forks and personal customisations, and also more useful for us collaborators since the origin HEAD will be kept up-to-date.
2011-08-24Constants that are used once are dumbMax Howell
It just means nobody knows what is being done without scrolling up and down, up and down the file like a doofus on a pogo stick.
2011-08-06Reset --hard after the first git initMax Howell
We don't know what revision the tarball was when homebrew was installed, so all we can do really is hard reset. In theory some set of git commands should suffice, but apparently --soft and --mixed resets ended up putting stuff in the index which would break subsequent `brew updates`. Fixes #6851
2011-08-02Fix `brew update` local changes bugJack Nagel
Users were seeing local changes in their repository after updating, even though they had made no local changes. The repository setup sequence should use `git reset --soft` rather than vanilla `git reset`, which defaults to '--mixed'. '--soft' updates _only_ HEAD, leaving the index as-is, allowing future incantations of `brew update` to proceed without errors. Fixes #6732.
2011-07-31Fix brew update on LeopardAdam Vandenberg
2011-07-29Make the check for a valid git repo betterMax Howell
Because the new installer creates the .git directory when it installs.
2011-06-17Don’t output "nothing" messagesMax Howell
This is how we do it in general in Homebrew.
2011-06-15Don’t error out if the Cellar doesn’t yet existMax Howell
2011-06-15Fix first `brew update` with Git 1.7.4+; Fixes #5128Max Howell
Behaviour for git checkout was changed such that the update would fail because it refused to checkout files on to existing files in the working directory. This was bad behaviour anyway, we should make efforts to keep any local modifications to the Homebrew checkout. Everything is neatly resolved if we just do a --soft reset. Closes #6017.
2011-06-14refactor `update` command to use git diff instead of parsing `pull` outputMislav Marohnić
This fixes reporting of which formulae changed in git versions where `pull` output is not compatible. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-03-21brew up: star installed formulaeJonas Pfenniger
When running `brew up`, if a mentioned formulae is also installed, it will get a wildcard start at the end. It makes it easier to see if any installed formulae is impacted. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-03-12Refactor the brew command into one file per commandMax Howell
The code was sucking. To the extent that maintenance was hard. It's a lot easier to work with code that is sensibly split at sensible boundaries. So now it is more like that. But the refactor is minimal. Because we don't want you to have more merge hell than absolutely necessary. If you merge you will need to pay attention to brew.h.rb (as it is deleted) and bin/brew (as command logic is gone). It will be painful, but you will just have to help git out by moving any changes around manually. Note compatibility.rb. It ensures that any function renames or removals don't break anything. We're pretty serious about backwards compatibility. And that's because we encourage you to hack around with the innards. And we couldn't do that if we would then just make stuff disappear behind your back.