Skip to content
Snippets Groups Projects
Unverified Commit 70d1ff3e authored by boklm's avatar boklm
Browse files

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.
parent c61e6940
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment