From 3ab2cc62e2b4bd41f78516b0d3b856466979846c Mon Sep 17 00:00:00 2001 From: Maurice Kelly Date: Sun, 15 Apr 2012 14:20:54 +0100 Subject: [PATCH] info: handle git:// URLs in origin remote The URL being constructed is only able to extract the correct username when git@ or https:// URLs are found as the origin remote. This change allows git:// to be used as well. Signed-off-by: Maurice Kelly Closes Homebrew/homebrew#11670. Signed-off-by: Jack Nagel --- Library/Homebrew/cmd/info.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/cmd/info.rb b/Library/Homebrew/cmd/info.rb index 3edb6abcee..0a9cb76dbf 100644 --- a/Library/Homebrew/cmd/info.rb +++ b/Library/Homebrew/cmd/info.rb @@ -22,7 +22,7 @@ module Homebrew extend self def github_fork if system "/usr/bin/which -s git" - if `git remote -v` =~ %r{origin\s+(https?://|git@)github.com[:/](.+)/homebrew} + if `git remote -v` =~ %r{origin\s+(https?://|git(?:@|://))github.com[:/](.+)/homebrew} $2 end end