'Open the index for this repository.
:raise NoIndexPresent: If no index is present
:return: The matching `Index`'

def open_index(self):

    from dulwich.index import Index
    if (not self.has_index()):
        raise NoIndexPresent()
    return Index(self.index_path())
