Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GitPath ¶
GitPath resolves the given path to the .git directory (GIT_DIR). from https://git-scm.com/book/en/v2/Git-Internals-Environment-Variables#_repository_locations GIT_DIR is the location of the .git folder. If this isn’t specified, Git walks up the directory tree until it gets to ~ or /, looking for a .git directory at every step.
func InsideWorkTree ¶
func InsideWorkTree() bool
InsideWorkTree checks if the current working directory is inside the working tree of a git repository. returns true if the cwd in a git repository.
func TopLevelDirectory ¶
TopLevelDirectory computes the path to the top-level directory of the git repository.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.