text: public override string ToString(){byte[] raw = ToByteArray();CanonicalTreeParser p = new CanonicalTreeParser();p.Reset(raw);StringBuilder r = new StringBuilder();r.Append("Tree={");if (!p.Eof){r.Append('\n');try{new ObjectChecker().CheckTree(raw);}catch (CorruptObjectException error){r.Append("*** ERROR: ").Append(error.Message).Append("\n");r.Append('\n');}}while (!p.Eof){FileMode mode = p.EntryFileMode;r.Append(mode);r.Append(' ');r.Append(Constants.TypeString(mode.GetObjectType()));r.Append(' ');r.Append(p.EntryObjectId.Name);r.Append(' ');r.Append(p.EntryPathString);r.Append('\n');p.Next();}r.Append("}");return r.ToString();}