From a84edd0e6464c2dd08248b24455443d6b7d15433 Mon Sep 17 00:00:00 2001 From: Klaus Silveira Date: Mon, 10 Sep 2012 01:28:55 -0300 Subject: [PATCH] Much faster Windows detection --- boot.php | 4 ---- src/GitList/Component/Git/Repository.php | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/boot.php b/boot.php index cc88f69..3a5b62b 100644 --- a/boot.php +++ b/boot.php @@ -1,9 +1,5 @@ set('git', 'repositories', rtrim($config->get('git', 'repositories'), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR); diff --git a/src/GitList/Component/Git/Repository.php b/src/GitList/Component/Git/Repository.php index 1d27985..214bf43 100644 --- a/src/GitList/Component/Git/Repository.php +++ b/src/GitList/Component/Git/Repository.php @@ -227,7 +227,7 @@ class Repository */ public function getTotalCommits($file = null) { - if (WINDOWS_BUILD) { + if (defined('PHP_WINDOWS_VERSION_BUILD')) { $command = "rev-list --count --all $file"; } else { $command = "rev-list --all $file | wc -l";