Use git-update-ref and git-symbolic-ref in tests