@jeffheifetz good point,  indeed git-pull could result in merge issues.

For the branch parameter, besides passing a branch name, commit sha and tag are acceptable either, thus the git-pull actually is not adaptable for latter two situations, and git-pull just gives a warning and does nothing.

there are options to solve the problem:
1. check if `branch` is a existed branch and call `git checkout origin/branch` if yes
or
2. user must pass `origin/branch` for branch name, then git-checkout is enough for all situations, no further git command needed.

any suggestion?

P.S the reason why accept commit sha and tag here is that auto-mobile-spec test requires to accept sha and tag.