- 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).
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.
This is also used by `brew <cmd> --help`. The basic idea is to have the
documentation as a top level comment in each command file. To find these
comments, they have to be like this `#:`.
This is also used by the `brew man` command to keep the documentation
DRY, and for that there are now a header and footer for the man page.
Generally it seems user agents are all `software/version` but ours is
not. Also, set the user agent in a way that it's shared between Bash
and Ruby code.
Closes https://github.com/Homebrew/legacy-homebrew/pull/50480.
* move shell completion scripts to where can be auto picked up
Let's use switching new remote as opportunity to put shell completion
scripts to where they should be and avoid git conflict during the process.
* add Library/Formula and Library/Aliases symlinks
Formulae and Aliases has been relocated to homebrew/core tap.
The symlinks are pointed to new location to keep backward compatibility.
* remove formula_renames and tap_migrations
They have been replaced by the json files in the core tap.
* update: set new remote
* bump Homebrew version to 0.9.9
The idea is to let `scm/git` to handle all of git location resolution
throughout Homebrew codebase.
ClosesHomebrew/homebrew#50116.
Signed-off-by: Xu Cheng <xucheng@me.com>
This needs to be `Homebrew $HOMEBREW_VERSION` so we can be adequately
filtered.
ClosesHomebrew/homebrew#49961.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
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.
When there are merge conflicts we fail pretty hard. This is still
possible after this commit but at least we've given Git enough pointers
to make it less likely.
ClosesHomebrew/homebrew#49299.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This should help to prevent situations where a user accidentally ends up
"stranded" in a branch indefinitely.
Additionally, the stash is never popped automatically at the end of a
successful update, but the stash-pop message is printed if something is
stashed.
When an interrupt occurs, the original behavior is still in place
(switch back to the old branch and revision, and pop the stash), though
this could be changed as well.
This commit modifies the behavior of both `brew update` and
"update-bash.sh" in the manner described above.
The idea for this approach is from Mike McQuaid.
Issue Homebrew/homebrew#48812ClosesHomebrew/homebrew#48993.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Check to see if `HEAD` is the same as what we have locally. If it is:
don't bother to `git fetch`.
ClosesHomebrew/homebrew#47888.
ClosesHomebrew/homebrew#49219.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Also, rename the existing updater to `update-ruby` to allow using as
a fallback. It will eventually be removed.
ClosesHomebrew/homebrew#49109.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>