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");
}