Documentation
¶
Index ¶
- func BranchMerge(branch string) (string, error)
- func BranchRemote(branch string) (string, error)
- func CommitCounts() (int, int, error)
- func DescribeTag(ref string) (string, error)
- func HasCleanWorkingTree() (bool, error)
- func HasUntracked() (bool, error)
- func LsFilesUnmerged() (string, error)
- func RevParseShort() (string, []byte, error)
- func SparseCheckout() (bool, error)
- func SymbolicRef(ref string) (string, error)
- type GitRepo
- func (g *GitRepo) BranchInfo(cfg config.GitPromptStringConfig) (string, error)
- func (g *GitRepo) BranchStatus(cfg config.GitPromptStringConfig) (string, string, error)
- func (g *GitRepo) GitDirFileExists(name string) (bool, error)
- func (g *GitRepo) GitDirFileExistsExitOnError(name string) bool
- func (g *GitRepo) GitDirPath(path string) string
- func (g *GitRepo) IsGitDir(name string) bool
- func (g *GitRepo) IsGitDirSymlink(name string) bool
- func (g *GitRepo) ReadGitDirFile(name string) (string, error)
- func (g *GitRepo) ReadGitDirFileEmptyOnError(name string) string
- func (g *GitRepo) ReadGitDirFileExitOnError(name string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BranchMerge ¶
func BranchRemote ¶
func CommitCounts ¶
func DescribeTag ¶
func HasCleanWorkingTree ¶
func HasUntracked ¶
func LsFilesUnmerged ¶
func RevParseShort ¶
func SparseCheckout ¶
func SymbolicRef ¶
Types ¶
type GitRepo ¶
type GitRepo struct {
GitDir string
IsInGitDir *bool // pointer is used during checks if in a git repo
IsInWorkTree bool
IsInBareRepo bool
IsInShallowRepo bool
IsSparseCheckout bool
Tag string
AbbrevRef string
ShortSha string
PromptMergeStatus string
PromptSparseCheckoutStatus string
PromptBranch string
PromptBareRepoStatus string
}
func (*GitRepo) BranchInfo ¶
func (g *GitRepo) BranchInfo(cfg config.GitPromptStringConfig) (string, error)
func (*GitRepo) BranchStatus ¶
func (*GitRepo) GitDirFileExistsExitOnError ¶
func (*GitRepo) GitDirPath ¶
func (*GitRepo) IsGitDirSymlink ¶
func (*GitRepo) ReadGitDirFileEmptyOnError ¶ added in v1.3.1
func (*GitRepo) ReadGitDirFileExitOnError ¶
Click to show internal directories.
Click to hide internal directories.