diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-11-13 13:51:19 -0800 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-11-13 13:51:19 -0800 |
commit | 3c5c93b2ebb9be715df2a34f150020dc7af73b15 (patch) | |
tree | 0b58e0878fdafd98fda9f7aa89d2f6e65f1311a0 /railties/lib | |
parent | 8f6ce1a17ea1d73c3becc16ece79046e113daf8e (diff) | |
parent | f945178a601f18c2c649fd925ca069da8c0f1547 (diff) | |
download | rails-3c5c93b2ebb9be715df2a34f150020dc7af73b15.tar.gz rails-3c5c93b2ebb9be715df2a34f150020dc7af73b15.tar.bz2 rails-3c5c93b2ebb9be715df2a34f150020dc7af73b15.zip |
Merge pull request #8169 from nicolasdespres/robust_git_repository_check
Rake test:uncommitted finds git directory in ancestors.
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/test_unit/testing.rake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/test_unit/testing.rake b/railties/lib/rails/test_unit/testing.rake index cd59fbe599..9ad3a4e6d6 100644 --- a/railties/lib/rails/test_unit/testing.rake +++ b/railties/lib/rails/test_unit/testing.rake @@ -88,7 +88,7 @@ namespace :test do def t.file_list if File.directory?(".svn") changed_since_checkin = silence_stderr { `svn status` }.split.map { |path| path.chomp[7 .. -1] } - elsif File.directory?(".git") + elsif system "git rev-parse --git-dir 2>&1 >/dev/null" changed_since_checkin = silence_stderr { `git ls-files --modified --others --exclude-standard` }.split.map { |path| path.chomp } else abort "Not a Subversion or Git checkout." |