public static string TypeToString(Type type) { switch (type) { case Type.Blob: return "blob"; case Type.Tree: return "tree"; case Type.Tag: return "tag"; case Type.Commit: return "commit"; } return "blob"; }