From df2a40d20794ac2cb377479451acaf89ca2f6d17 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Fri, 25 May 2018 22:54:34 +0200 Subject: [PATCH] Use `remote` instead of `path.git_origin`. --- Library/Homebrew/compat/tap.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/compat/tap.rb b/Library/Homebrew/compat/tap.rb index df720e35eb..13c667f286 100644 --- a/Library/Homebrew/compat/tap.rb +++ b/Library/Homebrew/compat/tap.rb @@ -13,7 +13,7 @@ class Tap old_name = name old_path = path - old_remote = path.git_origin + old_remote = remote clear_cache super(new_user, new_repo) @@ -24,8 +24,6 @@ class Tap ENV[new_initial_revision_var] ||= ENV[old_initial_revision_var] ENV[new_current_revision_var] ||= ENV[old_current_revision_var] - return unless old_path.git? - new_name = name new_path = path new_remote = default_remote @@ -36,6 +34,8 @@ class Tap path.dirname.mkpath FileUtils.mv old_path, new_path + return unless old_path.git? + puts "Changing remote from #{old_remote} to #{new_remote}..." if $stdout.tty? new_path.git_origin = new_remote end