Move repository equality check into the repo itself.