Use git show-branch for ver.txt. Slightly cleaner.
Make sure the supplied version is a valid ref