aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorXu Cheng2015-09-08 17:46:34 +0800
committerXu Cheng2015-09-09 12:19:16 +0800
commit1b531492cac1af458506f6535ecc97137cabbc91 (patch)
tree686b107d45b17c28591c0b71decaab009a114881 /Library
parentedbb3a9e53358a720c390df23839cf8f4abb1b10 (diff)
downloadbrew-1b531492cac1af458506f6535ecc97137cabbc91.tar.bz2
utils: add Homebrew.git_origin
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/utils.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb
index bec8861da..f1fd7409a 100644
--- a/Library/Homebrew/utils.rb
+++ b/Library/Homebrew/utils.rb
@@ -149,6 +149,10 @@ module Homebrew
_system(cmd, *args)
end
+ def self.git_origin
+ HOMEBREW_REPOSITORY.cd { `git config --get remote.origin.url 2>/dev/null`.chuzzle }
+ end
+
def self.git_head
HOMEBREW_REPOSITORY.cd { `git rev-parse --verify -q HEAD 2>/dev/null`.chuzzle }
end