diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index b61a994a37..e7478bb4f5 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -515,7 +515,7 @@ class GitDownloadStrategy < VCSDownloadStrategy end def has_ref? - quiet_system 'git', '--git-dir', git_dir, 'rev-parse', '-q', '--verify', @ref + quiet_system 'git', '--git-dir', git_dir, 'rev-parse', '-q', '--verify', "#{@ref}^{commit}" end def repo_valid?