diff --git a/Library/Homebrew/cmd/update.sh b/Library/Homebrew/cmd/update.sh index cc8d626088..29206b37f8 100644 --- a/Library/Homebrew/cmd/update.sh +++ b/Library/Homebrew/cmd/update.sh @@ -1,8 +1,9 @@ -#: * `update` [`--rebase`]: +#: * `update` [`--merge`]: #: Fetch the newest version of Homebrew and all formulae from GitHub using #: `git`(1). #: -#: If `--rebase` is specified then `git pull --rebase` is used. +#: If `--merge` is specified then `git merge` is used to include updates +#: (rather than `git rebase`). brew() { "$HOMEBREW_BREW_FILE" "$@" @@ -199,7 +200,7 @@ pull() { # ensure we don't munge line endings on checkout git config core.autocrlf false - if [[ -n "$HOMEBREW_REBASE" ]] + if [[ -z "$HOMEBREW_MERGE" ]] then git rebase "${QUIET_ARGS[@]}" "origin/$UPSTREAM_BRANCH" else @@ -236,7 +237,7 @@ homebrew-update() { --help) brew help update; exit $? ;; --verbose) HOMEBREW_VERBOSE=1 ;; --debug) HOMEBREW_DEBUG=1;; - --rebase) HOMEBREW_REBASE=1 ;; + --merge) HOMEBREW_MERGE=1 ;; --simulate-from-current-branch) HOMEBREW_SIMULATE_FROM_CURRENT_BRANCH=1 ;; --preinstall) HOMEBREW_UPDATE_PREINSTALL=1 ;; --*) ;; diff --git a/share/doc/homebrew/brew.1.html b/share/doc/homebrew/brew.1.html index 2a790aaf6d..4356cf24a4 100644 --- a/share/doc/homebrew/brew.1.html +++ b/share/doc/homebrew/brew.1.html @@ -390,10 +390,11 @@ source. This is useful for creating patches for the software.
unpin formulaeUnpin formulae, allowing them to be upgraded by brew upgrade. See also
pin.
untap tapRemove a tapped repository.
update [--rebase]Fetch the newest version of Homebrew and all formulae from GitHub using +
update [--merge]Fetch the newest version of Homebrew and all formulae from GitHub using
git(1).
If --rebase is specified then git pull --rebase is used.
If --merge is specified then git merge is used to include updates
+ (rather than git rebase).
upgrade [install-options] [--cleanup] [formulae]Upgrade outdated, unpinned brews.
Options for the install command are also valid here.