diff options
| author | Sebastian Staudt | 2011-03-29 21:58:16 +0200 |
|---|---|---|
| committer | Adam Vandenberg | 2011-04-18 22:30:48 -0700 |
| commit | be482fb9abb3e2e09d491e87cfc7aa5880b700dd (patch) | |
| tree | 76e8d349274886b409e38c611e41c043e7c5b7e0 | |
| parent | e08ef940beaeb8251d7db0645bbc980535f481e5 (diff) | |
| download | brew-be482fb9abb3e2e09d491e87cfc7aa5880b700dd.tar.bz2 | |
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 <flangy@gmail.com>
| -rw-r--r-- | Library/Homebrew/cmd/info.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/info.rb b/Library/Homebrew/cmd/info.rb index ce66c6ef7..caae4cbf1 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 |
