| Age | Commit message (Collapse) | Author |
|
Don't require/recommend ownership of /usr/local.
|
|
Apple reset this on every OS X major (and some minor) updates and it
always proves a painful and unnecessary step. Instead just check the
directories we actually care about are writable.
This may mean if these directories do not already exist (although they
are now created by the installed) that `brew link` will fail and require
manual intervention but this seems to be superior for both new and the
majority of existing users.
|
|
We’re defining developers as people who have run a dev-cmd at least
once.
|
|
|
|
Closes #877
|
|
scm/git: make --homebrew=print-path use realpath.
|
|
A `git reset --hard` without stashing first risks nuking in-progress
work. A `git reset --mixed` should allow stashing to occur more often
on e.g. merge conflicts.
Fixes #766.
|
|
This reverts commit b6afa228f4974f4af1e8938911e35150aa2991c8 from #778.
|
|
Otherwise it can end up as e.g. `bin/git` which then breaks when we
`cd` to another directory and try to run it.
|
|
- Inconsistent or unneeded indentation
- Missing or superfluous empty lines
- Missing or wrongly formatted arguments in command summary
- Missing punctuation
|
|
update: add --force argument.
|
|
Add a `brew update --force` to side-step all of the clever optimisations
we have to detect if an update is unnecessary. That means if those
optimisations go wrong in future we can tell people just to run this
single command.
This would have been a useful workaround for the issue fixed in 985c672.
|
|
UPSTREAM_BRANCH was being used both as a loop variable name and name
for the upstream branch for HOMEBREW_REPOSITORY. This meant that the
variable names were overwritten which prevented update.
Closes #693.
|
|
|
|
Otherwise this can prevent taps from being updated as expected.
|
|
|
|
This can just live in `brew.sh` and then it doesn’t need repeated in
all the other places.
|
|
Tweak the logic further to make the no-op case even faster.
Before:
```
brew update 1.10s user 1.05s system 92% cpu 2.325 total
brew update --preinstall 0.60s user 0.77s system 96% cpu 1.433 total
```
After:
```
brew update 0.60s user 0.34s system 83% cpu 1.132 total
brew update --preinstall 0.29s user 0.24s system 62% cpu 0.860 total
```
These times are now fast enough to avoid any further special-casing for
`--preinstall`, roll it out to users by default and not print a message
unless we've actually found some updates.
|
|
Fixes #671.
|
|
This is less than ideal but it gets the time on my machine down from ~6s
to ~2s when checking no taps. It still shows that we're doing way more
in `update.sh` than we need to be doing but that's a future PR.
|
|
|
|
Closes #588.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
|
|
Closes https://github.com/Homebrew/brew/issues/519
Closes https://github.com/Homebrew/homebrew-core/issues/3029
|
|
|
|
Move some stuff formerly in `Library/ENV` around:
- Move `Library/ENV/$XCODE_VERSION` to `Library/Homebrew/env/super` as they are
all superenv wrappers and all symlinks to the same version. We never needed
the "separate shims for separate versions" functionality and it just adds
confusion.
- Move `Library/ENV/pkgconfig` to `Library/Homebrew/env/pkgconfig` to get more
things under `Library/Homebrew`
- Move `Library/ENV/scm` to `Library/scm` as these wrappers are not actually
used by or related to superenv (or stdenv) in any way.
|
|
|
|
A temporary measure before we decide whether vendor git or not.
|
|
Would have made it easier to debug
https://github.com/Homebrew/homebrew-core/issues/2804 where wasn't clear which
directory was causing the issue.
|
|
We might as well be consistent about it, since it's not obvious to people
what the next step is after we've pointed out the directory isn't writable.
Fixes #476.
|
|
* Don't infinitely recurse `brew update --preinstall`.
This could happen when trying to `brew install git` inside `brew update
--preinstall`.
* update.sh: cache Git PATH.
We don’t need to look it up from superenv every time; this is slow.
* update.sh: print message before preinstall updates.
* update.sh: verbose output fetch directory.
This aids reading `brew update --verbose --debug` output.
* update.sh: skip taps without formulae on preinstall.
We don’t need to update them as we’re not invoking them.
* update.sh: don't force update-report on developer preinstall.
This is too slow.
|
|
This is inspired by `safe_system` with basically the same implication
(fail on error), making the name a lot less confusing and avoiding a
clash with the `chdir` function previously defined in `bin/brew`.
Closes #414.
Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
|
|
|
|
As they may use e.g. `git pull` which may result in them having formulae
that aren't migrated (and they mind less about the slight slowdown).
|
|
git stash pop -q will print "Already up-to-date!" if untracked changes
are being poppped. This quiets it down unless verbose is set.
Closes #320.
Signed-off-by: ilovezfs <ilovezfs@icloud.com>
|
|
Always pop stashed changes for Homebrew developers and only checkout
original branches for them (to avoid users who don't understand Git
ending up "stuck" on branches).
|
|
|
|
git is also used in analytics.sh
|
|
|
|
Closes #181.
Signed-off-by: Xu Cheng <xucheng@me.com>
|
|
Fix regression introduced in fafe8f0f53bf91fc41f016b5c2af41ca712783f7.
Counting the number of hyphens in a string cannot be done in a single
expression, thus split this and introduce another local variable.
Fixes #227.
|
|
Fix regression introduced in fafe8f0f53bf91fc41f016b5c2af41ca712783f7.
|
|
`brew update` can cause these so `brew update` should repair these.
|
|
- When running `brew update` and there’s been no changes from upstream
on any repositories there’s no need to call the (relatively) slow `brew
update-report` when we already know what it will say (“Already up-to
date.”).
- When any`git fetch`es fail then throw out an error at the end of the
output and produce a failing exit code (closes #65).
|
|
This doesn't work as expected and causes confusing user errors.
References #95.
|
|
Otherwise it will match any character
|
|
To be synced with the help flag list in brew.rb
|
|
We want to always avoid merge commits being committed to Homebrew so
this feels like a better fit.
|
|
This is coming out of preview shortly so use the new API content-type.
|
|
Also, slightly tweak the behavior of `brew update` in this case so that
it doesn't print annoying output and still allows the `brew edit` flow
for people with `HOMEBREW_DEVELOPER` set.
|
|
|