Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadGitConfig ¶
func LoadGitConfig() error
LoadGitConfig loads required git config values. Returns an error if required values are missing.
We use the git command rather than go-git's config API because go-git does not support [include] or [includeIf] directives (see https://github.com/go-git/go-git/issues/395). The git command properly handles all config levels (system, global, local) and includes.
func ResetTestConfig ¶
func ResetTestConfig()
ResetTestConfig resets the configuration to unloaded state.
func SetTestConfig ¶
func SetTestConfig(email, github string)
SetTestConfig sets test configuration values. Call ResetTestConfig after tests.
Types ¶
type BranchInfo ¶
type CommitInfo ¶
type DirtyDetails ¶
type DirtyDetails struct {
Untracked int
UntrackedNames []string
StagedFiles int
StagedNames []string
StagedInsertions int
StagedDeletions int
UnstagedFiles int
UnstagedNames []string
UnstagedInsertions int
UnstagedDeletions int
}
func (*DirtyDetails) String ¶
func (d *DirtyDetails) String() string
func (*DirtyDetails) TotalFiles ¶
func (d *DirtyDetails) TotalFiles() int
type RemoteInfo ¶
type RepoInfo ¶
type RepoInfo struct {
Path string
Name string
IsGitRepo bool
HasUserRemote bool
UserRemotes []string
AllRemotes []RemoteInfo
BranchesWithCommits []BranchInfo
TotalUserCommits int
LastCommitDate string // Last commit by user
LastRepoCommitDate string // Last commit by anyone
HasUncommittedChanges bool
DirtyDetails *DirtyDetails
CurrentBranch string
DefaultBranch string
Ahead int
Behind int
StashCount int
Stashes []StashInfo
RecentCommits []CommitInfo // Recent commits on current branch
IsFork bool
UpstreamURL string
Error string
}
func AnalyzeDirectory ¶
func AnalyzeRepo ¶
Click to show internal directories.
Click to hide internal directories.