code: def generate_git_version_info():
      
      info = GitInfo()
      git_path = call(('which', 'git'))
  
      # get build info
      info.builder = get_build_name()
      info.build_date = get_build_date()
  
      # parse git ID
      info.hash, info.date, info.author, info.committer = (
          get_last_commit(git_path))
  
      # determine branch
      info.branch = get_git_branch(git_path)
  
      # determine tag
      info.tag = get_git_tag(info.hash, git_path)
  
      # determine version
      if info.tag:
          info.version = info.tag.strip('v')
          info.release = not re.search('[a-z]', info.version.lower())
      else:
          info.version = info.hash[:6]
          info.release = False
  
      # Determine *last* stable release
      info.last_release = determine_latest_release_version()
  
      # refresh index
      call((git_path, 'update-index', '-q', '--refresh'))
  
      # check working copy for changes
      info.status = get_git_status(git_path)
  
      return info
docs: Query the git repository information to generate a version module.