In this case `HOMEBREW_VERSION` is `>1.1.0 (no git repository)` so these tests failed. This was the cause of the Homebrew/homebrew-test-bot Linux CI failures as it was testing a shallow clone.
brew config