code: func (g *Git) Version(ctx context.Context) semver.Version {
  	v := semver.Version{}
  
  	cmd := exec.CommandContext(ctx, "git", "version")
  	cmdout, err := cmd.Output()
  	if err != nil {
  		out.Debug(ctx, "Failed to run 'git version': %s", err)
  		return v
  	}
  
  	svStr := strings.TrimPrefix(string(cmdout), "git version ")
  	if p := strings.Fields(svStr); len(p) > 0 {
  		svStr = p[0]
  	}
  
  	sv, err := semver.ParseTolerant(svStr)
  	if err != nil {
  		out.Debug(ctx, "Failed to parse '%s' as semver: %s", svStr, err)
  		return v
  	}
  	return sv
  }
docs: // Version returns the git version as major, minor and patch level