Utility code for reading Git tree objects