Gittern\Desiccator\CommitDesiccator::writeParent PHP Méthode

writeParent() protected méthode

protected writeParent ( Commit $commit, Iodophor\Io\Writer $writer )
$commit Gittern\Entity\GitObject\Commit
$writer Iodophor\Io\Writer
    protected function writeParent(Commit $commit, Writer $writer)
    {
        $sha = $commit->getSha();
        if (strlen($sha) != 40) {
            throw new NotPersistedException("Parent referred to by commit is not persisted yet.");
        }
        $writer->writeString8("parent ");
        $writer->writeString8($sha);
        $writer->writeString8("\n");
    }