Missing $branch when retrying clone

When cloning repository fails the retry is not calling cloneRepository() with $branch