diff options
| author | Sebastian Staudt | 2011-03-29 21:58:16 +0200 |
|---|---|---|
| committer | Adam Vandenberg | 2011-04-18 22:30:48 -0700 |
| commit | a91c050f00b65c5b6fcf8b299776e3f2c22af588 (patch) | |
| tree | fa2fa2824345c3949a175766a6e1136a1922055f /Library | |
| parent | 1d3dbc5e611435337d2b55be01729e90256dcbe8 (diff) | |
| download | homebrew-a91c050f00b65c5b6fcf8b299776e3f2c22af588.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>
Diffstat (limited to 'Library')
| -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 |
