Documentation
¶
Overview ¶
Package gitfacts collects bounded local git history facts for diagnostic evidence.
Index ¶
Constants ¶
View Source
const ( ShapeNonGit = "non_git" ShapeEmpty = "empty" ShapeSingleCommit = "single_commit" ShapeShallow = "shallow" ShapeFull = "full" DefaultMaxCommits = 200 DefaultMaxFilesPerCommit = 32 DefaultMaxBodyBytes = 4096 DefaultMaxBodyLines = 40 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Commit ¶
type Commit struct {
SHA string
Branch string
Parents []string
AuthorName string
AuthorEmail string
Message string
BodyPreview string
CommittedAt string
FilesChanged int
IsMerge bool
HistoryShape string
}
Commit is one local git commit fact.
type Diagnostics ¶
type Diagnostics struct {
Enabled bool `json:"enabled"`
HistoryShape string `json:"history_shape"`
IsShallow bool `json:"is_shallow,omitempty"`
Branch string `json:"branch,omitempty"`
MaxCommits int `json:"max_commits"`
MaxFilesPerCommit int `json:"max_files_per_commit"`
TotalCommits int `json:"total_commits,omitempty"`
CommitsRead int `json:"commits_read,omitempty"`
CommitsStored int `json:"commits_stored,omitempty"`
FilesStored int `json:"files_stored,omitempty"`
SkippedLargeCommits int `json:"skipped_large_commits,omitempty"`
BodiesTruncated int `json:"commit_bodies_truncated,omitempty"`
GitError string `json:"git_error,omitempty"`
}
Diagnostics summarizes collection and history shape.
type Facts ¶
type Facts struct {
Commits []Commit
Files []FileChange
Diagnostics Diagnostics
}
Facts is the collected local git history slice.
type FileChange ¶
FileChange is one file changed by a commit.
Click to show internal directories.
Click to hide internal directories.