Merge pull request #5718 from mtmiller/update-cmd-opts
Add `brew update -f` option and improve help string format
This commit is contained in:
commit
417a16fbaf
@ -2,8 +2,11 @@
|
||||
#:
|
||||
#: Fetch the newest version of Homebrew and all formulae from GitHub using `git`(1) and perform any necessary migrations.
|
||||
#:
|
||||
#: --merge `git merge` is used to include updates (rather than `git rebase`).
|
||||
#: --force Always do a slower, full update check (even if unnecessary).
|
||||
#: --merge `git merge` is used to include updates (rather than `git rebase`).
|
||||
#: -f, --force Always do a slower, full update check (even if unnecessary).
|
||||
#: -v, --verbose Print the directories checked and `git` operations performed.
|
||||
#: -d, --debug Display a trace of all shell commands as they are executed.
|
||||
#: -h, --help Show this message.
|
||||
|
||||
# Don't need shellcheck to follow this `source`.
|
||||
# shellcheck disable=SC1090
|
||||
@ -306,6 +309,7 @@ homebrew-update() {
|
||||
-*)
|
||||
[[ "$option" = *v* ]] && HOMEBREW_VERBOSE=1
|
||||
[[ "$option" = *d* ]] && HOMEBREW_DEBUG=1
|
||||
[[ "$option" = *f* ]] && HOMEBREW_UPDATE_FORCE=1
|
||||
;;
|
||||
*)
|
||||
odie <<EOS
|
||||
|
@ -195,7 +195,12 @@ module Homebrew
|
||||
line = line.slice(4..-1)
|
||||
next unless line
|
||||
|
||||
lines << line.gsub(/^ +(-+[a-z-]+) */, "* `\\1`:\n ")
|
||||
# Omit the common global_options documented separately in the man page.
|
||||
next if line =~ /--(debug|force|help|quiet|verbose) /
|
||||
|
||||
# Format one option or a comma-separated pair of short and long options.
|
||||
lines << line.gsub(/^ +(-+[a-z-]+), (-+[a-z-]+) +/, "* `\\1`, `\\2`:\n ")
|
||||
.gsub(/^ +(-+[a-z-]+) +/, "* `\\1`:\n ")
|
||||
end
|
||||
lines
|
||||
end
|
||||
|
@ -540,9 +540,6 @@ Fetch the newest version of Homebrew and all formulae from GitHub using `git`(1)
|
||||
* `--merge`:
|
||||
`git merge` is used to include updates (rather than `git rebase`).
|
||||
|
||||
* `--force`:
|
||||
Always do a slower, full update check (even if unnecessary).
|
||||
|
||||
### `update-reset` [*`repository`*]
|
||||
Fetches and resets Homebrew and all tap repositories (or any specified `repository`) using `git`(1) to their latest `origin/master`. Note this will destroy all your uncommitted or committed changes.
|
||||
|
||||
|
@ -660,10 +660,6 @@ Fetch the newest version of Homebrew and all formulae from GitHub using \fBgit\f
|
||||
\fB\-\-merge\fR
|
||||
\fBgit merge\fR is used to include updates (rather than \fBgit rebase\fR)\.
|
||||
.
|
||||
.TP
|
||||
\fB\-\-force\fR
|
||||
Always do a slower, full update check (even if unnecessary)\.
|
||||
.
|
||||
.SS "\fBupdate\-reset\fR [\fIrepository\fR]"
|
||||
Fetches and resets Homebrew and all tap repositories (or any specified \fBrepository\fR) using \fBgit\fR(1) to their latest \fBorigin/master\fR\. Note this will destroy all your uncommitted or committed changes\.
|
||||
.
|
||||
|
Loading…
x
Reference in New Issue
Block a user