Add git.current_branch.
Support branch matching in git.latest.
Merge pull request #7370 from boltronics/develop

git.latest should not touch the repo on an up-to-date branch