'Check if a particular object is present by SHA1.
This method makes no distinction between loose and packed objects.'

def __contains__(self, sha):

    if (self.contains_packed(sha) or self.contains_loose(sha)):
        return True
    for alternate in self.alternates:
        if (sha in alternate):
            return True
    return False
