env

package
v0.64.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2026 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

View Source
const (
	GitDirEnvVar      = "GIT_DIR"
	GitWorkTreeEnvVar = "GIT_WORK_TREE"
)

The variables with which git can be told where a repo is, rather than having it find out from the working directory.

Variables

This section is empty.

Functions

func GetGitDirEnv

func GetGitDirEnv() string

func GetGitLocationEnvVars added in v0.64.1

func GetGitLocationEnvVars() []string

GetGitLocationEnvVars returns the location variables that are set, as "NAME=value" entries.

func GetWorkTreeEnv added in v0.40.1

func GetWorkTreeEnv() string

func SetGitDirEnv

func SetGitDirEnv(value string)

func SetGitLocationEnvVars added in v0.64.1

func SetGitLocationEnvVars(envVars []string)

SetGitLocationEnvVars sets the location variables from "NAME=value" entries, clearing both first so that only what is given remains. Passing nothing is how you say the repo is to be found from the working directory.

func SetWorkTreeEnv added in v0.40.1

func SetWorkTreeEnv(value string)

func UnsetGitLocationEnvVars added in v0.40.1

func UnsetGitLocationEnvVars()

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL