$default_branch = $this->getConfig("defaultbranch");
$active_branch = $this->getActiveBranch();
if($active_branch != $default_branch) {
- if(!($dir = $this->localBranchPath($branch))) {
+ if(!($dir = $this->localBranchPath($active_branch))) {
$dir = $this->localBranchPath($active_branch, true);
$this->updateBranch($active_branch, $dir, true);
}