sha1-name.c: remove the_repo from sort_ambiguous()