Jeff King wrote: > On Tue, Aug 16, 2011 at 01:16:33PM -0500, Jonathan Nieder wrote: >> static struct tree *empty_tree(void) >> { >> - struct tree *tree = xcalloc(1, sizeof(struct tree)); >> - >> - tree->object.parsed = 1; >> - tree->object.type = OBJ_TREE; >> - pretend_sha1_file(NULL, 0, OBJ_TREE, tree->object.sha1); >> - return tree; >> + return lookup_tree((const unsigned char *)EMPTY_TREE_SHA1_BIN); >> } > > Much nicer. But doesn't your dab0d41 (correct type of > EMPTY_TREE_SHA1_BIN, 2011-02-07) make the cast unnecessary? Yes, I was working against an older codebase (for no particular reason). -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html