Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileHistory ¶
type FileHistory struct {
Path string
CommitCount int
FirstCommitAt int64
LastCommitAt int64
AuthorCount int
LastAuthor string
LastSubject string
}
FileHistory holds git commit statistics for a single file.
func CollectHistory ¶
func CollectHistory(gitRoot, relPath string) FileHistory
CollectHistory runs git log to gather change history for relPath within gitRoot. Returns a zero-value FileHistory (CommitCount == 0) on any error: git not installed, directory not a git repo, or file untracked.
Click to show internal directories.
Click to hide internal directories.