Update git refs before comparing refs

The current check will work since an known tag is already at the right
ref and an unknown tag will give an unequal value from git rev-list. But
this fails to work if the version is, for example, 'origin/master'
rather than a git tag.

Change-Id: I746624649acaa7fab217b8ff5570f5822003b2f3
Merge "Update git refs before comparing refs"