49 lines
1.5 KiB
Ruby
Raw Normal View History

# frozen_string_literal: true
require "net/http"
require "net/https"
require "json"
2019-04-17 18:25:08 +09:00
require "cli/parser"
require "formula"
require "formulary"
require "version"
require "pkg_version"
require "formula_info"
2014-09-20 14:27:54 +01:00
module Homebrew
2016-09-26 01:44:51 +02:00
module_function
def pull_args
Homebrew::CLI::Parser.new do
hide_from_man_page!
2018-09-28 21:39:52 +05:30
usage_banner <<~EOS
`pull` [<options>] <patch>
2018-09-28 21:39:52 +05:30
Get a patch from a GitHub commit or pull request and apply it to Homebrew.
2018-10-02 19:54:22 +05:30
Each <patch> may be the number of a pull request in `homebrew/core`
or the URL of any pull request or commit on GitHub.
2018-09-28 21:39:52 +05:30
EOS
switch "--bump",
2019-04-30 08:44:35 +01:00
description: "For one-formula PRs, automatically reword commit message to our preferred format."
2018-09-28 21:39:52 +05:30
switch "--clean",
2019-04-30 08:44:35 +01:00
description: "Do not rewrite or otherwise modify the commits found in the pulled PR."
2018-09-28 21:39:52 +05:30
switch "--ignore-whitespace",
2019-04-30 08:44:35 +01:00
description: "Silently ignore whitespace discrepancies when applying diffs."
2018-09-28 21:39:52 +05:30
switch "--resolve",
2019-04-30 08:44:35 +01:00
description: "When a patch fails to apply, leave in progress and allow user to resolve, instead "\
"of aborting."
2018-09-28 21:39:52 +05:30
switch "--branch-okay",
2019-04-30 08:44:35 +01:00
description: "Do not warn if pulling to a branch besides master (useful for testing)."
2018-09-28 21:39:52 +05:30
switch "--no-pbcopy",
2019-04-30 08:44:35 +01:00
description: "Do not copy anything to the system clipboard."
2020-07-30 18:40:10 +02:00
min_named 1
2018-03-25 19:08:17 +05:30
end
end
def pull
odisabled "brew pull", "gh pr checkout"
2017-03-05 15:01:28 -05:00
end
2014-09-20 14:27:54 +01:00
end