'Get the contents of a SHA file on disk.'

@classmethod
def from_file(cls, f):

    try:
        obj = cls._parse_file(f)
        obj._sha = None
        return obj
    except (IndexError, ValueError):
        raise ObjectFormatException('invalid    object    header')
