eb47f00b24d9f4ea9eedb64eb3cd75247d2d37d3

Author: gwoo

Date: 2009-07-30 15:52:45 -0700

fixing bug in source

diff --git a/models/source.php b/models/source.php index 685043f..71241e7 100644 --- a/models/source.php +++ b/models/source.php @@ -45,11 +45,10 @@ class Source extends Object { if (!empty($args)) { $branch = $args[0]; - if (!$this->Repo->branch) { + $branches = $this->Repo->find('branches'); + if (in_array($branch, $branches)) { $branch = array_shift($args); $path = join(DS, $args); - $this->Repo->branch('master', true); - $branches = $this->Repo->find('branches'); if (in_array($branch, $branches)) { $this->Repo->branch($branch, true); $this->Repo->pull('origin', $branch);