Documentation
¶
Index ¶
Constants ¶
View Source
const ( // RenameThreshold specifies the percentage of removed lines that // still exist in destination to consider them linked. RenameThreshold = 40 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Commit ¶
type FileChange ¶
type FileChange struct {
Name string `json:"filepath"`
IsBinary bool `json:"isBinary"`
Additions int `json:"additions"`
Deletions int `json:"deletions"`
RawAdditions int `json:"rawAdditions"`
RawDeletions int `json:"rawDeletions"`
RenameFrom string `json:"renameOf,omitempty"`
RenameTo string `json:"renameTo,omitempty"`
Similarity float32 `json:"similarity,omitempty"`
}
func NewFileChange ¶
func NewFileChange(name string, fp diff.FilePatch) *FileChange
Based heavily on: https://github.com/src-d/go-git/blob/d6c4b113c17a011530e93f179b7ac27eb3f17b9b/plumbing/object/patch.go
type FileChanges ¶
type FileChanges []*FileChange
func NewFileChanges ¶
func NewFileChanges(changes object.Changes) (FileChanges, error)
type Parser ¶
func (*Parser) ParseProject ¶
type Project ¶
type Project struct {
Name string `json:"name"`
Commits Commits `json:"commits"`
// contains filtered or unexported fields
}
func NewProject ¶
func (*Project) ParseCommits ¶
Click to show internal directories.
Click to hide internal directories.