def METHOD_NAME(self, index):
    """Drop entry with specified index."""
    with open(self._reflog_path, "rb+") as f:
        drop_reflog_entry(f, index, rewrite=True)
    if len(self) == 0:
        os.remove(self._reflog_path)
        del self._repo.refs[self._ref]
        return
    if index == 0:
        self._repo.refs[self._ref] = self[0].new_sha