From be482fb9abb3e2e09d491e87cfc7aa5880b700dd Mon Sep 17 00:00:00 2001 From: Sebastian Staudt Date: Tue, 29 Mar 2011 21:58:16 +0200 Subject: [PATCH] Fixed reading branch name The git command now uses --git-dir instead of --work-tree. Using --work-tree won't work if you are inside another Git repository. Signed-off-by: Adam Vandenberg --- 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 ce66c6ef7f..caae4cbf11 100644 --- a/Library/Homebrew/cmd/info.rb +++ b/Library/Homebrew/cmd/info.rb @@ -25,7 +25,7 @@ module Homebrew extend self if system "/usr/bin/which -s git" gh_user=`git config --global github.user 2>/dev/null`.chomp - /^\*\s*(.*)/.match(`git --work-tree=#{HOMEBREW_REPOSITORY} branch 2>/dev/null`) + /^\*\s*(.*)/.match(`git --git-dir=#{HOMEBREW_REPOSITORY}/.git branch 2>/dev/null`) unless $1.nil? || $1.empty? || gh_user.empty? branch = $1.chomp user = gh_user