From 6e37c67fba138fe28d41a0dc33bd004c226b2179 Mon Sep 17 00:00:00 2001 From: Bo Anderson Date: Fri, 17 Dec 2021 00:17:15 +0000 Subject: [PATCH] Fix disabled args appearing in documentation. --- Library/Homebrew/.rubocop.yml | 2 +- Library/Homebrew/cmd/install.rb | 1 + Library/Homebrew/cmd/tap.rb | 10 ++++------ Library/Homebrew/dev-cmd/pr-automerge.rb | 5 ++--- Library/Homebrew/dev-cmd/pr-publish.rb | 5 ++--- completions/bash/brew | 6 ------ completions/fish/brew.fish | 6 ------ completions/zsh/_brew | 6 ------ docs/Manpage.md | 10 ---------- manpages/brew.1 | 20 -------------------- 10 files changed, 10 insertions(+), 61 deletions(-) diff --git a/Library/Homebrew/.rubocop.yml b/Library/Homebrew/.rubocop.yml index ba94d7d67d..9f8b3cad11 100644 --- a/Library/Homebrew/.rubocop.yml +++ b/Library/Homebrew/.rubocop.yml @@ -16,7 +16,7 @@ Lint/NestedMethodDefinition: Metrics/AbcSize: Max: 280 Metrics/BlockLength: - Max: 102 + Max: 103 Exclude: # TODO: extract more of the bottling logic - "dev-cmd/bottle.rb" diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb index 371432d8ce..940e6a082c 100644 --- a/Library/Homebrew/cmd/install.rb +++ b/Library/Homebrew/cmd/install.rb @@ -51,6 +51,7 @@ module Homebrew }], [:flag, "--env=", { description: "Disabled other than for internal Homebrew use.", + hidden: true, }], [:switch, "--ignore-dependencies", { description: "An unsupported Homebrew development flag to skip installing any dependencies of any kind. " \ diff --git a/Library/Homebrew/cmd/tap.rb b/Library/Homebrew/cmd/tap.rb index 97c8686b43..72ee260c6d 100644 --- a/Library/Homebrew/cmd/tap.rb +++ b/Library/Homebrew/cmd/tap.rb @@ -29,9 +29,11 @@ module Homebrew EOS switch "--full", description: "Convert a shallow clone to a full clone without untapping. Taps are only cloned as "\ - "shallow clones if `--shallow` was originally passed." + "shallow clones if `--shallow` was originally passed.", + replacement: false switch "--shallow", - description: "Fetch tap as a shallow clone rather than a full clone. Useful for continuous integration." + description: "Fetch tap as a shallow clone rather than a full clone. Useful for continuous integration.", + replacement: false switch "--force-auto-update", description: "Auto-update tap even if it is not hosted on GitHub. By default, only taps "\ "hosted on GitHub are auto-updated (for performance reasons)." @@ -58,10 +60,6 @@ module Homebrew elsif args.no_named? puts Tap.names else - odisabled "`brew tap --full`" if args.full? - - odisabled "`brew tap --shallow`" if args.shallow? - tap = Tap.fetch(args.named.first) begin tap.install clone_target: args.named.second, diff --git a/Library/Homebrew/dev-cmd/pr-automerge.rb b/Library/Homebrew/dev-cmd/pr-automerge.rb index 443efc6932..749d6fb991 100644 --- a/Library/Homebrew/dev-cmd/pr-automerge.rb +++ b/Library/Homebrew/dev-cmd/pr-automerge.rb @@ -28,7 +28,8 @@ module Homebrew description: "Run `brew pr-publish` on matching pull requests." switch "--autosquash", description: "Instruct `brew pr-publish` to automatically reformat and reword commits "\ - "in the pull request to our preferred format." + "in the pull request to our preferred format.", + replacement: "`--no-autosquash` to opt out" switch "--no-autosquash", description: "Instruct `brew pr-publish` to skip automatically reformatting and rewording commits "\ "in the pull request to the preferred format." @@ -42,8 +43,6 @@ module Homebrew def pr_automerge args = pr_automerge_args.parse - odisabled "`brew pr-automerge --autosquash`", "`brew pr-automerge`" if args.autosquash? - without_labels = args.without_labels || [ "do not merge", "new formula", diff --git a/Library/Homebrew/dev-cmd/pr-publish.rb b/Library/Homebrew/dev-cmd/pr-publish.rb index 548f2545fb..7dd4c48d75 100644 --- a/Library/Homebrew/dev-cmd/pr-publish.rb +++ b/Library/Homebrew/dev-cmd/pr-publish.rb @@ -18,7 +18,8 @@ module Homebrew EOS switch "--autosquash", description: "If supported on the target tap, automatically reformat and reword commits "\ - "in the pull request to our preferred format." + "in the pull request to our preferred format.", + replacement: "`--no-autosquash` to opt out" switch "--no-autosquash", description: "Skip automatically reformatting and rewording commits in the pull request "\ "to the preferred format, even if supported on the target tap." @@ -43,8 +44,6 @@ module Homebrew workflow = args.workflow || "publish-commit-bottles.yml" ref = args.branch || "master" - odisabled "`brew pr-publish --autosquash`", "`brew pr-publish`" if args.autosquash? - extra_args = [] extra_args << "--autosquash" unless args.no_autosquash? extra_args << "--message='#{args.message}'" if args.message.presence diff --git a/completions/bash/brew b/completions/bash/brew index 3e70d6e6e4..8e21bead08 100644 --- a/completions/bash/brew +++ b/completions/bash/brew @@ -1063,7 +1063,6 @@ _brew_instal() { --debug --dictionarydir --display-times - --env --fetch-HEAD --fontdir --force @@ -1120,7 +1119,6 @@ _brew_install() { --debug --dictionarydir --display-times - --env --fetch-HEAD --fontdir --force @@ -1530,7 +1528,6 @@ _brew_pr_automerge() { case "${cur}" in -*) __brewcomp " - --autosquash --debug --help --ignore-failures @@ -1554,7 +1551,6 @@ _brew_pr_publish() { case "${cur}" in -*) __brewcomp " - --autosquash --branch --debug --help @@ -1896,12 +1892,10 @@ _brew_tap() { --custom-remote --debug --force-auto-update - --full --help --list-pinned --quiet --repair - --shallow --verbose " return diff --git a/completions/fish/brew.fish b/completions/fish/brew.fish index 7ed7a4f10c..a30e5b8918 100644 --- a/completions/fish/brew.fish +++ b/completions/fish/brew.fish @@ -767,7 +767,6 @@ __fish_brew_complete_arg 'instal' -l colorpickerdir -d 'Target location for Colo __fish_brew_complete_arg 'instal' -l debug -d 'If brewing fails, open an interactive debugging session with access to IRB or a shell inside the temporary build directory' __fish_brew_complete_arg 'instal' -l dictionarydir -d 'Target location for Dictionaries (default: `~/Library/Dictionaries`)' __fish_brew_complete_arg 'instal' -l display-times -d 'Print install times for each package at the end of the run' -__fish_brew_complete_arg 'instal' -l env -d 'Disabled other than for internal Homebrew use' __fish_brew_complete_arg 'instal' -l fetch-HEAD -d 'Fetch the upstream repository to detect if the HEAD installation of the formula is outdated. Otherwise, the repository\'s HEAD will only be checked for updates when a new stable or development version has been released' __fish_brew_complete_arg 'instal' -l fontdir -d 'Target location for Fonts (default: `~/Library/Fonts`)' __fish_brew_complete_arg 'instal' -l force -d 'Install formulae without checking for previously installed keg-only or non-migrated versions. When installing casks, overwrite existing files (binaries and symlinks are excluded, unless originally from the same cask)' @@ -815,7 +814,6 @@ __fish_brew_complete_arg 'install' -l colorpickerdir -d 'Target location for Col __fish_brew_complete_arg 'install' -l debug -d 'If brewing fails, open an interactive debugging session with access to IRB or a shell inside the temporary build directory' __fish_brew_complete_arg 'install' -l dictionarydir -d 'Target location for Dictionaries (default: `~/Library/Dictionaries`)' __fish_brew_complete_arg 'install' -l display-times -d 'Print install times for each package at the end of the run' -__fish_brew_complete_arg 'install' -l env -d 'Disabled other than for internal Homebrew use' __fish_brew_complete_arg 'install' -l fetch-HEAD -d 'Fetch the upstream repository to detect if the HEAD installation of the formula is outdated. Otherwise, the repository\'s HEAD will only be checked for updates when a new stable or development version has been released' __fish_brew_complete_arg 'install' -l fontdir -d 'Target location for Fonts (default: `~/Library/Fonts`)' __fish_brew_complete_arg 'install' -l force -d 'Install formulae without checking for previously installed keg-only or non-migrated versions. When installing casks, overwrite existing files (binaries and symlinks are excluded, unless originally from the same cask)' @@ -1063,7 +1061,6 @@ __fish_brew_complete_arg 'postinstall' -a '(__fish_brew_suggest_formulae_install __fish_brew_complete_cmd 'pr-automerge' 'Find pull requests that can be automatically merged using `brew pr-publish`' -__fish_brew_complete_arg 'pr-automerge' -l autosquash -d 'Instruct `brew pr-publish` to automatically reformat and reword commits in the pull request to our preferred format' __fish_brew_complete_arg 'pr-automerge' -l debug -d 'Display any debugging information' __fish_brew_complete_arg 'pr-automerge' -l help -d 'Show this message' __fish_brew_complete_arg 'pr-automerge' -l ignore-failures -d 'Include pull requests that have failing status checks' @@ -1078,7 +1075,6 @@ __fish_brew_complete_arg 'pr-automerge' -l without-labels -d 'Pull requests must __fish_brew_complete_cmd 'pr-publish' 'Publish bottles for a pull request with GitHub Actions' -__fish_brew_complete_arg 'pr-publish' -l autosquash -d 'If supported on the target tap, automatically reformat and reword commits in the pull request to our preferred format' __fish_brew_complete_arg 'pr-publish' -l branch -d 'Branch to publish to (default: `master`)' __fish_brew_complete_arg 'pr-publish' -l debug -d 'Display any debugging information' __fish_brew_complete_arg 'pr-publish' -l help -d 'Show this message' @@ -1291,12 +1287,10 @@ __fish_brew_complete_cmd 'tap' 'Tap a formula repository' __fish_brew_complete_arg 'tap' -l custom-remote -d 'Install or change a tap with a custom remote. Useful for mirrors' __fish_brew_complete_arg 'tap' -l debug -d 'Display any debugging information' __fish_brew_complete_arg 'tap' -l force-auto-update -d 'Auto-update tap even if it is not hosted on GitHub. By default, only taps hosted on GitHub are auto-updated (for performance reasons)' -__fish_brew_complete_arg 'tap' -l full -d 'Convert a shallow clone to a full clone without untapping. Taps are only cloned as shallow clones if `--shallow` was originally passed' __fish_brew_complete_arg 'tap' -l help -d 'Show this message' __fish_brew_complete_arg 'tap' -l list-pinned -d 'List all pinned taps' __fish_brew_complete_arg 'tap' -l quiet -d 'Make some output more quiet' __fish_brew_complete_arg 'tap' -l repair -d 'Migrate tapped formulae from symlink-based to directory-based structure' -__fish_brew_complete_arg 'tap' -l shallow -d 'Fetch tap as a shallow clone rather than a full clone. Useful for continuous integration' __fish_brew_complete_arg 'tap' -l verbose -d 'Make some output more verbose' __fish_brew_complete_arg 'tap' -a '(__fish_brew_suggest_taps_installed)' diff --git a/completions/zsh/_brew b/completions/zsh/_brew index a947068de9..d4ff441251 100644 --- a/completions/zsh/_brew +++ b/completions/zsh/_brew @@ -945,7 +945,6 @@ _brew_instal() { '--debug[If brewing fails, open an interactive debugging session with access to IRB or a shell inside the temporary build directory]' \ '(--formula)--dictionarydir[Target location for Dictionaries (default: `~/Library/Dictionaries`)]' \ '(--cask)--display-times[Print install times for each package at the end of the run]' \ - '(--cask)--env[Disabled other than for internal Homebrew use]' \ '(--cask)--fetch-HEAD[Fetch the upstream repository to detect if the HEAD installation of the formula is outdated. Otherwise, the repository'\''s HEAD will only be checked for updates when a new stable or development version has been released]' \ '(--formula)--fontdir[Target location for Fonts (default: `~/Library/Fonts`)]' \ '--force[Install formulae without checking for previously installed keg-only or non-migrated versions. When installing casks, overwrite existing files (binaries and symlinks are excluded, unless originally from the same cask)]' \ @@ -997,7 +996,6 @@ _brew_install() { '--debug[If brewing fails, open an interactive debugging session with access to IRB or a shell inside the temporary build directory]' \ '(--formula)--dictionarydir[Target location for Dictionaries (default: `~/Library/Dictionaries`)]' \ '(--cask)--display-times[Print install times for each package at the end of the run]' \ - '(--cask)--env[Disabled other than for internal Homebrew use]' \ '(--cask)--fetch-HEAD[Fetch the upstream repository to detect if the HEAD installation of the formula is outdated. Otherwise, the repository'\''s HEAD will only be checked for updates when a new stable or development version has been released]' \ '(--formula)--fontdir[Target location for Fonts (default: `~/Library/Fonts`)]' \ '--force[Install formulae without checking for previously installed keg-only or non-migrated versions. When installing casks, overwrite existing files (binaries and symlinks are excluded, unless originally from the same cask)]' \ @@ -1304,7 +1302,6 @@ _brew_postinstall() { # brew pr-automerge _brew_pr_automerge() { _arguments \ - '--autosquash[Instruct `brew pr-publish` to automatically reformat and reword commits in the pull request to our preferred format]' \ '--debug[Display any debugging information]' \ '--help[Show this message]' \ '--ignore-failures[Include pull requests that have failing status checks]' \ @@ -1321,7 +1318,6 @@ _brew_pr_automerge() { # brew pr-publish _brew_pr_publish() { _arguments \ - '--autosquash[If supported on the target tap, automatically reformat and reword commits in the pull request to our preferred format]' \ '--branch[Branch to publish to (default: `master`)]' \ '--debug[Display any debugging information]' \ '--help[Show this message]' \ @@ -1579,12 +1575,10 @@ _brew_tap() { '--custom-remote[Install or change a tap with a custom remote. Useful for mirrors]' \ '--debug[Display any debugging information]' \ '--force-auto-update[Auto-update tap even if it is not hosted on GitHub. By default, only taps hosted on GitHub are auto-updated (for performance reasons)]' \ - '--full[Convert a shallow clone to a full clone without untapping. Taps are only cloned as shallow clones if `--shallow` was originally passed]' \ '--help[Show this message]' \ '--list-pinned[List all pinned taps]' \ '--quiet[Make some output more quiet]' \ '--repair[Migrate tapped formulae from symlink-based to directory-based structure]' \ - '--shallow[Fetch tap as a shallow clone rather than a full clone. Useful for continuous integration]' \ '--verbose[Make some output more verbose]' \ - tap \ '*::tap:__brew_any_tap' diff --git a/docs/Manpage.md b/docs/Manpage.md index 88ac3a53ad..09eada1f09 100644 --- a/docs/Manpage.md +++ b/docs/Manpage.md @@ -320,8 +320,6 @@ is already installed but outdated. Print the verification and postinstall steps. * `--formula`: Treat all named arguments as formulae. -* `--env`: - Disabled other than for internal Homebrew use. * `--ignore-dependencies`: An unsupported Homebrew development flag to skip installing any dependencies of any kind. If the dependencies are not already present, the formula will have issues. If you're not developing Homebrew, consider adjusting your PATH rather than using this flag. * `--only-dependencies`: @@ -612,10 +610,6 @@ simplifies but also limits. This two-argument command makes no assumptions, so taps can be cloned from places other than GitHub and using protocols other than HTTPS, e.g. SSH, git, HTTP, FTP(S), rsync. -* `--full`: - Convert a shallow clone to a full clone without untapping. Taps are only cloned as shallow clones if `--shallow` was originally passed. -* `--shallow`: - Fetch tap as a shallow clone rather than a full clone. Useful for continuous integration. * `--force-auto-update`: Auto-update tap even if it is not hosted on GitHub. By default, only taps hosted on GitHub are auto-updated (for performance reasons). * `--custom-remote`: @@ -1239,8 +1233,6 @@ Find pull requests that can be automatically merged using `brew pr-publish`. Pull requests do not require approval to be merged. * `--publish`: Run `brew pr-publish` on matching pull requests. -* `--autosquash`: - Instruct `brew pr-publish` to automatically reformat and reword commits in the pull request to our preferred format. * `--no-autosquash`: Instruct `brew pr-publish` to skip automatically reformatting and rewording commits in the pull request to the preferred format. * `--ignore-failures`: @@ -1251,8 +1243,6 @@ Find pull requests that can be automatically merged using `brew pr-publish`. Publish bottles for a pull request with GitHub Actions. Requires write access to the repository. -* `--autosquash`: - If supported on the target tap, automatically reformat and reword commits in the pull request to our preferred format. * `--no-autosquash`: Skip automatically reformatting and rewording commits in the pull request to the preferred format, even if supported on the target tap. * `--branch`: diff --git a/manpages/brew.1 b/manpages/brew.1 index d2e938292f..04def268f5 100644 --- a/manpages/brew.1 +++ b/manpages/brew.1 @@ -417,10 +417,6 @@ Print the verification and postinstall steps\. Treat all named arguments as formulae\. . .TP -\fB\-\-env\fR -Disabled other than for internal Homebrew use\. -. -.TP \fB\-\-ignore\-dependencies\fR An unsupported Homebrew development flag to skip installing any dependencies of any kind\. If the dependencies are not already present, the formula will have issues\. If you\'re not developing Homebrew, consider adjusting your PATH rather than using this flag\. . @@ -843,14 +839,6 @@ With \fIURL\fR unspecified, tap a formula repository from GitHub using HTTPS\. S With \fIURL\fR specified, tap a formula repository from anywhere, using any transport protocol that \fBgit\fR(1) handles\. The one\-argument form of \fBtap\fR simplifies but also limits\. This two\-argument command makes no assumptions, so taps can be cloned from places other than GitHub and using protocols other than HTTPS, e\.g\. SSH, git, HTTP, FTP(S), rsync\. . .TP -\fB\-\-full\fR -Convert a shallow clone to a full clone without untapping\. Taps are only cloned as shallow clones if \fB\-\-shallow\fR was originally passed\. -. -.TP -\fB\-\-shallow\fR -Fetch tap as a shallow clone rather than a full clone\. Useful for continuous integration\. -. -.TP \fB\-\-force\-auto\-update\fR Auto\-update tap even if it is not hosted on GitHub\. By default, only taps hosted on GitHub are auto\-updated (for performance reasons)\. . @@ -1756,10 +1744,6 @@ Pull requests do not require approval to be merged\. Run \fBbrew pr\-publish\fR on matching pull requests\. . .TP -\fB\-\-autosquash\fR -Instruct \fBbrew pr\-publish\fR to automatically reformat and reword commits in the pull request to our preferred format\. -. -.TP \fB\-\-no\-autosquash\fR Instruct \fBbrew pr\-publish\fR to skip automatically reformatting and rewording commits in the pull request to the preferred format\. . @@ -1771,10 +1755,6 @@ Include pull requests that have failing status checks\. Publish bottles for a pull request with GitHub Actions\. Requires write access to the repository\. . .TP -\fB\-\-autosquash\fR -If supported on the target tap, automatically reformat and reword commits in the pull request to our preferred format\. -. -.TP \fB\-\-no\-autosquash\fR Skip automatically reformatting and rewording commits in the pull request to the preferred format, even if supported on the target tap\. .