How can I know if `repair_taps` is necessary?

First, I thought of an approach, using `need_repair_taps`:

```ruby
  def rename_taps_dir_if_necessary
    need_repair_taps = false
    Dir["Library/Taps/*"].each do |tapd|
      next unless File.directory?(tapd)

      if File.directory?(tapd + "/.git")
        url = `cd #{tapd} && git remote -v`.strip.split[1]
        if url =~ %r{(https?://|git(?:@|://))github.com[:/](.+)/(.+)(\.git)?}
          user, repo = $2.downcase, $3.downcase.sub("homebrew-", "")
          FileUtils.mkdir_p("Library/Taps/#{user}") unless File.directory?("Library/Taps/#{user}")
          FileUtils.mv(tapd, "Library/Taps/#{user}/#{repo}")
          need_repair_taps = true
        end
      end
    end

    repair_taps if need_repair_taps
  end
```