make --ignore-missing work with --ref