| Age | Commit message (Collapse) | Author |
|
Also, rename the existing updater to `update-ruby` to allow using as
a fallback. It will eventually be removed.
Closes Homebrew/homebrew#49109.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
|
|
Abbreviations will be longer if needed to preserve uniqueness.
This makes it more consistent with `git rev-parse --short`,
https://github.com/Homebrew/homebrew/commits, etc.
For example, instead of:
Updated Homebrew from 40d1e9c2 to 90b9bdf4.
We see:
Updated Homebrew from 40d1e9c to 90b9bdf.
See 0c48248b6555353c8d60b61973639c8423ce586c for the original
introduction of eight-character abbreviations.
|
|
Closes Homebrew/homebrew#47665.
Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
|
|
This only affects the behavior of `brew update` while being on a branch
`feature` that doesn't track the upstream branch. For simplicity, the
upstream branch is assumed to be called `master` (`@upstream_branch` in
the code). Consider the following simplified commit history:
master origin/master (current state of remote)
| |
A---B---C---D---E---F
\
G---H---I
|
feature (HEAD)
If `origin/master` is equal to `master` and also points at commit `C`,
then `brew update` will update both `master` and `origin/master` to `F`
and report on the changes in the range `C..F`.
However, if `origin/master` is equal to `E` because some commits have
been already fetched with `git fetch origin`, then `brew update` will
recreate `master` from `origin/master` and then pull in the commits from
the remote to update both to `F`. Because `master` gets recreated from
a younger `origin/master`, the report will only contain changes from the
range `E..F` (thus omitting the changes from `C..E`).
This commit adjusts the logic to not recreate `master` if it can be
safely fast-forwarded to `origin/master` (the common case). This fixes
the problem from the second scenario and again reports on the desired
range `C..F`.
Closes Homebrew/homebrew#46951.
Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
|
|
Users with local changes and without a configured Git identity won't be
able to update Homebrew via `brew update`, as the update will fail when
trying to stash the local modifications with `git stash`. They will be
unable to proceed until they follow Git's advice to configure their
identity or they manage to revert their local changes.
This change always sets a commit e-mail and name, avoiding this issue. A
nice bonus is that experienced Git users can see who created the stash
commit (identifying `brew update` as the author).
Fixes Homebrew/homebrew#46930.
Closes Homebrew/homebrew#46939.
Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
|
|
A blocker for https://github.com/caskroom/homebrew-cask/pull/15381
being merged.
Closes Homebrew/homebrew#46795.
|
|
|
|
Across info, search and update.
Closes Homebrew/homebrew#45131.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
|
|
Do a reset to `origin/master` and then stash but don't pop the stash
after running update (unless you were on a branch). This may be mildly
more annoying for Homebrew developers but means it's easier for our
users who don't understand Git (and particularly when they don't
understand that every tap is a separate Git repository).
Closes Homebrew/homebrew#45825.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
|
|
Closes Homebrew/homebrew#46537.
Signed-off-by: Xu Cheng <xucheng@me.com>
|
|
Follow-up to ea6c8f7e2dc8f1adf8df9065468d0b37047d4a46
|
|
|
|
Closes Homebrew/homebrew#45676.
Signed-off-by: Xu Cheng <xucheng@me.com>
|
|
There's been a few issues where users have been confused about these
errors. They may have modified stuff but we probably don't care about
telling them that unless we're debugging other issues.
Closes Homebrew/homebrew#45373.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
|
|
Closes Homebrew/homebrew#43468.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
|
|
Closes Homebrew/homebrew#44335.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
|
|
Closes Homebrew/homebrew#44893.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
|
|
There are plenty of IO operations inside Tap object, and it will be more
when implementing formula alias reverse look up(e.g. list all of alias
names for a formula). So let's cache them.
Some benchmark:
$ time brew info $(brew ruby -e 'puts Formula.tap_names') > /dev/null
Before: 6.40s user 2.42s system 96% cpu 9.134 total
After: 4.75s user 0.77s system 97% cpu 5.637 total
Closes Homebrew/homebrew#44377.
Signed-off-by: Xu Cheng <xucheng@me.com>
|
|
Closes Homebrew/homebrew#42048
Closes Homebrew/homebrew#44434.
Signed-off-by: Xu Cheng <xucheng@me.com>
|
|
Fixes Homebrew/homebrew#43865.
|
|
e.g. when it's a detached `HEAD` through checking out a commit rather
than a branch.
|
|
Closes Homebrew/homebrew#42281.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
|
|
This overrides user configuration which may do otherwise.
Closes Homebrew/homebrew#41570.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
|
|
|
|
For update, all formula loading need to be secured by `rescue`.
Otherwise it's easy to crash `brew update` for vasty reasons, e.g.
new Formula DSL.
Closes Homebrew/homebrew#43353.
Signed-off-by: Xu Cheng <xucheng@me.com>
|
|
If the user's working copy is *not* on the 'master' branch, the revision
recorded after the update to the 'master' branch is not the one of the
updated 'master' branch but that of whatever the user's current branch
is. This tends to be not very helpful.
This change records the revision *after* the update to the 'master'
branch, but *before* switching back to the user's current branch prior
to the update, effectively causing the report to show changes to the
'master' branch.
Closes Homebrew/homebrew#42074.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
|
|
|
|
|
|
|
|
|
|
These are minor perf optimizations.
Closes Homebrew/homebrew#43028.
Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
|
|
|
|
Closes Homebrew/homebrew#42745.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
|
|
|
|
|
|
Closes Homebrew/homebrew#42558.
Signed-off-by: Xu Cheng <xucheng@me.com>
|
|
This should help to prevent similar situation of Homebrew/homebrew#42553 happening in the
future.
|
|
Closes Homebrew/homebrew#42354.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
|
|
Also add a `Tap#git?` method to indicate whether the tap is a git
repository.
Closes Homebrew/homebrew#42264.
Signed-off-by: Xu Cheng <xucheng@me.com>
|
|
|
|
Also:
- return to your previous branch after `brew update`.
Closes Homebrew/homebrew#38568.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
|
|
|
|
Closes Homebrew/homebrew#40090.
Signed-off-by: Xu Cheng <xucheng@me.com>
|
|
|
|
|
|
This was added in 3a7a3619f7016c75c3e53e944221bf7f6354a63b to make the
tests pass, but this method is now stubbed out in the tests, so we can
assume $? will be non-nil.
|
|
|
|
See 5cd6b35 and 8eefd4e.
|
|
|
|
|