writeTree() public method

Write all index trees to the object store, returning the root tree.
/// One or more paths contain higher-order stages (stage > 0), /// which cannot be stored in a tree object. /// /// One or more paths contain an invalid mode which should never /// appear in a tree object. /// /// An unexpected error occurred writing to the object store. ///
public writeTree ( ObjectWriter ow ) : ObjectId
ow ObjectWriter /// The writer to use when serializing to the store. ///
return ObjectId
Example #1
0
 private ObjectId Commit(ObjectWriter ow, DirCache treeB, ObjectId[] parentIds)
 {
     var c = new Commit(db) { TreeId = treeB.writeTree(ow), Author = new PersonIdent("A U Thor", "a.u.thor", 1L, 0) };
     c.Committer = c.Author;
     c.ParentIds = parentIds;
     c.Message = "Tree " + c.TreeId.Name;
     return ow.WriteCommit(c);
 }