diff --git a/Library/Homebrew/cmd/reinstall.rb b/Library/Homebrew/cmd/reinstall.rb index ae1f7cdaea..062119eb18 100644 --- a/Library/Homebrew/cmd/reinstall.rb +++ b/Library/Homebrew/cmd/reinstall.rb @@ -57,6 +57,9 @@ module Homebrew env: :display_install_times, description: "Print install times for each formula at the end of the run.", }], + [:switch, "-g", "--git", { + description: "Create a Git repository, useful for creating patches to the software.", + }], ].each do |options| send(*options) conflicts "--cask", options[-2] @@ -108,6 +111,7 @@ module Homebrew debug: args.debug?, quiet: args.quiet?, verbose: args.verbose?, + git: args.git?, ) Cleanup.install_formula_clean!(formula) end diff --git a/Library/Homebrew/reinstall.rb b/Library/Homebrew/reinstall.rb index ae9a5e0f10..2c9c0ee430 100644 --- a/Library/Homebrew/reinstall.rb +++ b/Library/Homebrew/reinstall.rb @@ -19,7 +19,8 @@ module Homebrew force: false, debug: false, quiet: false, - verbose: false + verbose: false, + git: false ) if formula.opt_prefix.directory? keg = Keg.new(formula.opt_prefix.resolved_path) @@ -44,6 +45,7 @@ module Homebrew build_bottle: tab&.built_bottle?, force_bottle: force_bottle, build_from_source_formulae: build_from_source_formulae, + git: git, interactive: interactive, keep_tmp: keep_tmp, force: force,