aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2008-11-02 19:36:56 +0530
committerPratik Naik <pratiknaik@gmail.com>2008-11-02 19:36:56 +0530
commitaba1d77f38da4a78d0049aff70b46ff0b7db25bf (patch)
tree9ee2f2040169b15594daa900129059c34fe71ee9 /activesupport/lib
parentbe1beb1a2d2c32aeb907b34d9d451b7a853c924d (diff)
downloadrails-aba1d77f38da4a78d0049aff70b46ff0b7db25bf.tar.gz
rails-aba1d77f38da4a78d0049aff70b46ff0b7db25bf.tar.bz2
rails-aba1d77f38da4a78d0049aff70b46ff0b7db25bf.zip
Check first for git repository before using git branch
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/testing/performance.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/testing/performance.rb b/activesupport/lib/active_support/testing/performance.rb
index f996c40793..bd136c2596 100644
--- a/activesupport/lib/active_support/testing/performance.rb
+++ b/activesupport/lib/active_support/testing/performance.rb
@@ -124,7 +124,7 @@ module ActiveSupport
def environment
unless defined? @env
- app = "#{$1}.#{$2}" if `git branch -v` =~ /^\* (\S+)\s+(\S+)/
+ app = "#{$1}.#{$2}" if File.directory?('.git') && `git branch -v` =~ /^\* (\S+)\s+(\S+)/
rails = Rails::VERSION::STRING
if File.directory?('vendor/rails/.git')