fix race condition with git checkout and revision parsing at the same time