fix(affected): no longer error if `main` does not exist (#9061)
### Description
https://github.com/vercel/turborepo/pull/9045 changed the error type of
`changed_files` as we could now exit with `Error::UnableToResolveRef`
instead of just returning the raw `Error::Git`. This resulted in us
failing to catch the error type. We keep the previous catch as there are
still scenarios where we'll be able to resolve a ref, but the checkout
will not include the merge base.
Existing integration test did not capture this as it our mocked shallow
clone leaves the branch `main` intact, just missing the commit that
would be the merge base.
### Testing Instructions
Added unit test