Example of problem:
+ git checkout 53753531bc19bae816cf0cbf9e713ce0333ba091 error: Your local changes to the following files would be overwritten by checkout: libcxx/test/std/algorithms/robust_against_adl.compile.pass.cpp Please commit your changes or stash them before you switch branches. Aborting
This script then will retry at a greater depth for this problem.
Note that checkout -f with a non-existing revision will exit non-zero.