-
- Downloads
Bug 29572: Update the test before running git checkout --detach
The reason we don't run |git checkout --detach| in all cases is that it fails when we cloned a repository without a master branch. To avoid running it in this case, we were checking if HEAD is pointing to a branch which has a corresponding file in the .git directory. However it seems there are other cases where HEAD is pointing to a branch which does not have a corresponding file in the .git directory. Instead we now check that |git rev-parse --verify HEAD| does not return an error, in which case we assume that |git checkout --detach| will not produce an error too.
Loading
Please register or sign in to comment