code: func LocalEnv() Environment {
  	env := applyEnvFlags(Environment{Name: "local", Repo: "ethereum/go-ethereum"})
  
  	head := readGitFile("HEAD")
  	if splits := strings.Split(head, " "); len(splits) == 2 {
  		head = splits[1]
  	} else {
  		return env
  	}
  	if env.Commit == "" {
  		env.Commit = readGitFile(head)
  	}
  	if env.Branch == "" {
  		if head != "HEAD" {
  			env.Branch = strings.TrimPrefix(head, "refs/heads/")
  		}
  	}
  	if info, err := os.Stat(".git/objects"); err == nil && info.IsDir() && env.Tag == "" {
  		env.Tag = firstLine(RunGit("tag", "-l", "--points-at", "HEAD"))
  	}
  	return env
  }
docs: // LocalEnv returns build environment metadata gathered from git.