Martin Afanasjew cc632acd07 update: avoid unnecessarily recreating 'master'
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>
2016-01-04 16:25:32 +01:00
2015-12-23 06:54:11 +01:00
2016-01-02 23:27:56 +01:00
2015-12-25 20:13:10 +00:00
2015-08-29 15:43:16 +01:00
2015-05-08 19:19:28 -07:00
2015-12-31 23:15:52 +08:00
2015-12-27 21:27:24 +00:00

Homebrew

Features, usage and installation instructions are summarised on the homepage.

What Packages Are Available?

  1. Type brew search for a list.
  2. Or visit braumeister.org to browse packages online.
  3. Or use brew search --desc to browse packages from the command line.

More Documentation

brew help, man brew or check our documentation.

Troubleshooting

First, please run brew update and brew doctor.

Second, read the Troubleshooting Checklist.

If you don't read these it will take us far longer to help you with your problem.

Security

Please report security issues to security@brew.sh.

This is our PGP key which is valid until June 17, 2016.

Who Are You?

Homebrew's current maintainers are Misty De Meo, Andrew Janke, Xu Cheng, Mike McQuaid, Baptiste Fontaine, Brett Koonce, Martin Afanasjew, Dominyk Tiller, Tim Smith and Alex Dunn.

Former maintainers with significant contributions include Jack Nagel, Adam Vandenberg and Homebrew's creator: Max Howell.

License

Code is under the BSD 2 Clause (NetBSD) license. Documentation is under the Creative Commons Attribution license.

Sponsors

Our CI infrastructure was paid for by our Kickstarter supporters.

Our CI infrastructure is hosted by The Positive Internet Company.

Our bottles (binary packages) are hosted by Bintray.

Downloads by Bintray

Description
🍺 The missing package manager for macOS (or Linux)
Readme 144 MiB
4.6.25 Latest
2025-09-16 21:53:50 +00:00
Languages
Ruby 92%
Shell 5.2%
Roff 2.1%
HTML 0.5%