Fix get_version_from_git() to support release commits