packfile: allow prepare_packed_git_one to handle arbitrary repositories