internal static ICommit Write(Repository aRepository, ITree aTree, IEnumerable<ICommit> aParents, IPerson aAuthor, IPerson aCommitter, string aDescription)
{
StringBuilder builder = new StringBuilder();
builder.Append("tree " + aTree.Id + "\n");
foreach (ICommit parent in aParents)
{
builder.Append("parent " + parent.Id + "\n");
}
builder.Append("author " + PersonTime.String(aAuthor) + "\n");
builder.Append("committer " + PersonTime.String(aCommitter) + "\n");
builder.Append("\n");
builder.Append(aDescription);
byte[] bytes = ASCIIEncoding.ASCII.GetBytes(builder.ToString());
string id = aRepository.WriteObject(bytes, EObjectType.Commit);
// TODO
return (new Commit(new CommitRef(aRepository, id, bytes)));
}