From: Gunnar Wrobel
Date: Tue, 2 Nov 2010 18:23:26 +0000 (+0100) Subject: Read the gitignore file. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=fba26cadf34413c03da1046632895080a51ecab9;p=horde.git Read the gitignore file. --- diff --git a/components/lib/Components/Helper/Root.php b/components/lib/Components/Helper/Root.php index e832b0f22..d6d9d2214 100644 --- a/components/lib/Components/Helper/Root.php +++ b/components/lib/Components/Helper/Root.php @@ -57,7 +57,9 @@ class Components_Helper_Root while ($current != '/' || $i < 10) { if (is_dir($current)) { $objects = scandir($current); - if (in_array('framework', $objects) && in_array('horde', $objects)) { + if (in_array('framework', $objects) + && in_array('horde', $objects) + && in_array('.gitignore', $objects)) { $this->_root_path = $current; break; } @@ -106,7 +108,7 @@ class Components_Helper_Root */ public function getGitIgnore() { - return ''; + return file_get_contents($this->_root_path . DIRECTORY_SEPARATOR . '.gitignore'); } /** diff --git a/components/test/Components/fixture/.gitignore b/components/test/Components/fixture/.gitignore new file mode 100644 index 000000000..80011f804 --- /dev/null +++ b/components/test/Components/fixture/.gitignore @@ -0,0 +1 @@ +IGNORE.txt