From ed9f775b778bad961a9e2fb178fce3a7af201e75 Mon Sep 17 00:00:00 2001 From: David Broder-Rodgers Date: Sat, 10 Dec 2016 14:20:47 +0000 Subject: Added support for returning HTTP status codes and for git and svn URLs --- Library/Homebrew/utils/git.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Library/Homebrew/utils/git.rb') diff --git a/Library/Homebrew/utils/git.rb b/Library/Homebrew/utils/git.rb index dfe47f890..1b4d24894 100644 --- a/Library/Homebrew/utils/git.rb +++ b/Library/Homebrew/utils/git.rb @@ -40,4 +40,9 @@ module Utils @git_path = nil @git_version = nil end + + def self.git_remote_exists(url) + return true unless git_available? + quiet_system "git", "ls-remote", url + end end -- cgit v1.2.3