setup.c: convert check_repository_format_gently to use strbuf