9579 Commits

Author SHA1 Message Date
Mike McQuaid
c8debd8fa4 utils: API Git credential tweaks.
- Use empty array when `git credential-osxkeychain` lookup fails to
  cache and avoid rerunning it when there's no valid results.
- Redirect `stderr` to avoid printing errors when there's a failure
  or no `git credential-osxkeychain` installed.

Closes Homebrew/homebrew#49954.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-03-10 18:45:43 +08:00
Xu Cheng
0f6def90b7 update: shallow fetch for git_init_if_necessary
Users shouldn't need to fetch all of git history.

Closes Homebrew/homebrew#49903.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-03-09 19:47:26 +08:00
Xu Cheng
e8caa48cc2 brew.sh: add tap-pin to sudo check list 2016-03-09 19:35:41 +08:00
Xu Cheng
865b788e96 Revert "update: checkout branch unconditionally"
This reverts commit 0525c9eeea27eff1a6de05e7a01ec268ae07437b.
Which breaks `brew update --rebase`.
2016-03-09 17:38:46 +08:00
Mike McQuaid
ec2a3f979e utils: use string arg to IO.popen.
Closes Homebrew/homebrew#49882.
2016-03-09 16:00:22 +08:00
Xu Cheng
bfb44d9e67 migrator: use Tap#core_tap? 2016-03-08 21:55:09 +08:00
Mike McQuaid
041c8502c5 Set HOMEBREW_API_TOKEN from Git when available.
As requested in Homebrew/homebrew#46578. Falls back to existing functionality.

Closes Homebrew/homebrew#46578.

Closes Homebrew/homebrew#49846.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-03-08 20:52:11 +08:00
Xu Cheng
0cbc285701 test_update_report: simplify test
Closes Homebrew/homebrew#49874.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-03-08 20:36:19 +08:00
Xu Cheng
3a4f2c1aea update: checkout branch unconditionally 2016-03-08 20:36:19 +08:00
Xu Cheng
cad2a5620f update: passing --force to git fetch
Per document:
> -f, --force
>    When git fetch is used with <rbranch>:<lbranch> refspec, it refuses
>    to update the local branch <lbranch> unless the remote branch
>    <rbranch> it fetches is a descendant of <lbranch>. This option
>    overrides that check.
2016-03-08 20:36:19 +08:00
cubuspl42
16f8b16f19 blacklist: suggest Cask for installing mactex
Closes Homebrew/homebrew#49817.

Signed-off-by: Alex Dunn <adunn@ucsb.edu>
2016-03-08 13:47:29 +08:00
Mike McQuaid
0578ba0f42 install_renamed: handle recursive installs.
Closes Homebrew/homebrew#49845.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-03-08 13:47:29 +08:00
Xu Cheng
6f9f3faef3 test-bot: fix wrong tap argument check 2016-03-07 20:00:35 +08:00
Xu Cheng
5b63890198 test-bot: check if current repo is a tap
If it's not a tap, we test formula on CoreTap. This can happen
if we run test on a fork, e.g. Linuxbrew or future Homebrew/brew.

Closes Homebrew/homebrew#49844.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-03-07 19:43:46 +08:00
Xu Cheng
1e487edd21 tap various commands: use tap name method.
Instead of hard coded `Homebrew/homebrew`
2016-03-07 19:43:46 +08:00
Xu Cheng
a3023c3ce8 add compat/tap
To keep backward compatibility for API name changing.
2016-03-07 19:43:46 +08:00
Xu Cheng
28f3dae8cd rename CoreFormulaRepository to CoreTap
Core tap will be separated from core code in the near future.
It makes sense to rename it to CoreTap.
2016-03-07 19:43:46 +08:00
Matthew Fluet
2b32cfe7b0 mlton 20130715 (new formula)
MLton is whole-program, optimizing compiler for Standard ML.

A previous mlton formula simply installed the upstream binary release
and was moved to the boneyard as a binary-only formula (see
Homebrew/homebrew#21780).

This new mlton formula builds from source, using the upstream binary
release to bootstrap.

Closes Homebrew/homebrew#48694.

Signed-off-by: Andrew Janke <andrew@apjanke.net>
2016-03-07 19:43:46 +08:00
Xu Cheng
c540343903 download_strategy: correct S3 url regex 2016-03-06 13:51:06 +08:00
Xu Cheng
9f96e41b40 tap: add methods to get git related information
These methods will be used in `brew --version`, `brew config`
and `brew doctor` after core/formula separation.

Closes Homebrew/homebrew#49796.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-03-06 13:51:06 +08:00
Xu Cheng
a2d0d88bf1 CoreFormulaRepository: move require statements to the top
This commit will help to mitigate bug Homebrew/homebrew#42553 on certain old Homebrew installations
(e.g. `osx_image: xcode6.4` on Travis CI) for future core/formula
separation.

On that particular Homebrew installations, `formulary.rb` will be loaded after
`git pull` is finished during `brew update`, which will then load `core_formular_repository.rb`.

By introducing `require "tap_migrations"` and `require "formula_renames"` at the top of
`core_formular_repository.rb`, we could use `tap_migrations.rb` as a
vector to preform certain hack for future core/formula separation.
2016-03-05 19:52:12 +08:00
Kel Cecil
59536356b6 Allow S3 buckets to have dots
Closes Homebrew/homebrew#49729.

Signed-off-by: Tim D. Smith <git@tim-smith.us>
2016-03-03 09:43:04 -08:00
Damien Pollet
57a81f9e22 Clarify case conventions in formula naming
If a formula's class name contains an uppercase-spelled acronym, the
messages given by `brew install` can be pretty confusing (it recommends
a formula named exactly the same…)

Closes Homebrew/homebrew#49639.

Signed-off-by: Tim D. Smith <git@tim-smith.us>
2016-03-01 22:12:29 -08:00
Josh Hagins
e404a71e43 diagnostic: only warn about local newline config
cd to `HOMEBREW_REPOSITORY` before checking git newline settings.

Closes Homebrew/homebrew#49565.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-03-01 13:25:24 -08:00
George Hartzell
76767f3d6e Formula-Cookbook: Improve testing suggestions
Based on recent feedback on some pull requests, I touched up the section about adding tests to formula.
I wanted to make it clearer that the examples demonstrate how to create files on the fly and add a pointer to the tinyxml2 formula (DomT4 pointed it out to me as a good example).

Closes Homebrew/homebrew#49641.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2016-02-29 16:30:23 +00:00
Tim D. Smith
b4edf23a36 test-bot: make bottle stats visible by default
Closes Homebrew/homebrew#49620.
2016-02-28 09:51:14 -08:00
Martin Afanasjew
bd679c7dc3 brew.sh: improve empty argument handling
Follow-up to Homebrew/homebrew#49327 that leaves empty argument handling to the Ruby code
(it is a bit more sophisticated and distinguished between `help` and an
empty argument list and treats them differently) instead of hard-wiring
the former to the `help` command.

Closes Homebrew/homebrew#49538.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-02-27 18:34:31 +01:00
Martin Afanasjew
2ab4f74527 brew.sh: drop reference to removed 'update-ruby'
This is a follow-up fix to a minor oversight in Homebrew/homebrew#49523.
2016-02-26 14:33:40 +01:00
Xu Cheng
eb6f970b90 tap: support --quieter flag
Closes Homebrew/homebrew#49551.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-02-26 18:42:36 +08:00
Xu Cheng
43c6061bc9 Tap#install: support quiet option 2016-02-26 18:42:36 +08:00
Usman Akeju
bbe4191c61 formula: sort outdated versions naturally.
Because the versions are read from directory listings, we get
alphabetical sorts of version numbers in `brew outdated` output:

   some-keg (10.1.10, 10.1.11, 10.1.9 < 10.1.12)

This is nicer:

   some-keg (10.1.9, 10.1.10, 10.1.11 < 10.1.12)

Closes Homebrew/homebrew#49534.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-02-26 09:04:05 +00:00
Xu Cheng
b52af53e71 various: use Tap abstraction
formula_rename and tap_migrations are now handled inside Tap.

Closes Homebrew/homebrew#49549.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-02-26 17:00:17 +08:00
Xu Cheng
73b79de7bc ARGV: switch? should only has one dash
If user inputs argument such as `-with-flag`, we can assume it's a bad flag.

Closes Homebrew/homebrew#49256

Closes Homebrew/homebrew#49550.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-02-26 16:50:55 +08:00
Xu Cheng
ba147818cb test_formulary: use CoreFormulaRepository abstraction 2016-02-26 13:33:36 +08:00
Martin Afanasjew
c20809526c os/mac/ruby_mach: don't hide actual parse errors
The current approach of suppressing all output regardless of what the
error is makes it very hard to debug any issues and misread but valid
Mach-O files will be silently interpreted as non-Mach-O files instead.

Prefer to fail if we are a Homebrew developer or running on the bot
(`HOMEBREW_DEVELOPER=1`), so that problems will be noticed and fixed
before the silent failure leads to hard-to-diagnose user problems.

Closes Homebrew/homebrew#48817.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-02-25 21:54:42 +01:00
Martin Afanasjew
01d642f150 vendor/macho: update to 0.2.2-39-ge2fbedc9 2016-02-25 21:54:41 +01:00
Xu Cheng
2496bdf280 remove update-ruby
Closes Homebrew/homebrew#49523.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-02-25 23:05:39 +08:00
Mike McQuaid
61e9d43ead bin/brew: unset POSIX mode.
We're using /bin/bash and not /bin/sh for a reason so don't allow users
to override this (seen in Homebrew/homebrew#49514).

Closes Homebrew/homebrew#49515.
2016-02-25 11:33:04 +00:00
Xu Cheng
9a4987533a update-report: fix new_full_name in report 2016-02-25 17:27:50 +08:00
Xu Cheng
79a01a47cc test_update_report: fix test
Closes Homebrew/homebrew#48546.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-02-25 17:22:28 +08:00
Xu Cheng
239c860863 update-report: refactoring
* Better variable/class name. `update-report` isn't response to actual
  update.
* Use abstraction offered by Reporter and ReproterHub class.
* Failure on one tap won't affect migration preformed by other taps.
* Simplify logic and prepare for core/formula separation.
2016-02-25 17:22:28 +08:00
Xu Cheng
95a6067702 update-report: refactoring ReporterHub
* Better variable/class name.
* Remove obsolete update_renamed, this is now handled inside each
  reporter.
* Remove obsolete formula file path to name computation, which is also
  handled by reporter.
* Hide low lever implementation detail to offer better abstraction.
  Use `add(reporter)` instead of `Hash#update` to add new report.
2016-02-25 17:22:28 +08:00
Xu Cheng
849e62c736 update-report: use tap inside Reporter
* Avoid tons of unnecessary file path manipulation. Use abstraction
offered by Tap class if possible.
* Handle formula rename/tap migration inside reporter in per tap basis.
* Avoid duplicated computation.
* Remove redundant/dead code.
2016-02-25 17:22:28 +08:00
Xu Cheng
87ecd621eb add Tap#tap_migrations
This enables tap migration feature in per tap case, which will
ultimately help core/formula separation.
2016-02-25 17:22:28 +08:00
Misty De Meo
a7869783ad Haskell: cap cabal-install make jobs at 64
Fixes Homebrew/homebrew#49509.

Closes Homebrew/homebrew#49511.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-02-25 08:08:34 +00:00
Shaun Jackman
842e19bbeb README.md: Fix a typo
Closes Homebrew/homebrew#49500.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-02-25 08:08:31 +00:00
Xu Cheng
6ac6cb4fcd TapLoader: improve load logic
* Use `Tap#formula_dir` instead of `Tap#formula_files` to find formula
  file to have better performance and avoid caching issue.
* Change the loader logic to search name -> search alias -> search old name.
  This is more consistence with what we do when loading core formula
  file.

Closes Homebrew/homebrew#49484.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-02-24 20:51:35 +08:00
Paul Phillips
6b6159a858 list: exclude .github from unbrewed
Recently added files polluting brew ls --unbrewed results.

Closes Homebrew/homebrew#49456.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-02-23 22:39:14 +01:00
Dominyk Tiller
a0855fde26 README: use secure SFC links 2016-02-23 11:46:34 +00:00
Mike McQuaid
6ff6786145 README: add SFC and donations section. 2016-02-23 10:26:31 +00:00