made UpdateGitRevision work more atomically