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.
Click to show internal directories.
Click to hide internal directories.