Gittern\Repository::setBranch PHP Method

setBranch() public method

public setBranch ( $branch, Commit $commit )
$commit Gittern\Entity\GitObject\Commit
    public function setBranch($branch, Entity\GitObject\Commit $commit)
    {
        // Because branch removes are executed after sets, if this branch
        // is queued for removal, remove it from that queue.
        if (($index = array_search($branch, $this->branch_removes)) !== false) {
            unset($this->branch_removes[$index]);
        }
        $this->branch_moves[$branch] = $commit;
    }