Fix infinite loop in recursive Git_Repo construction.
authorEdward Z. Yang <edwardzyang@thewritingpot.com>
Wed, 23 Jul 2008 03:04:57 +0000 (22 21:04 -0600)
committerEdward Z. Yang <edwardzyang@thewritingpot.com>
Wed, 23 Jul 2008 03:04:57 +0000 (22 21:04 -0600)
Signed-off-by: Edward Z. Yang <edwardzyang@thewritingpot.com>
library/Git/Repo.php

index 7553084..b11f7de 100644 (file)
@@ -52,6 +52,7 @@ class Git_Repo {
             }
             $temp = dirname($curpath);
             if (!$temp || $temp == $curpath) break;
+            $curpath = $temp;
         }
         if (is_null($this->path)) throw new Git_Exception_InvalidRepository($path);
         $this->git = new Git($this->wd);