Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DiffTrees ¶
DiffTrees calculates diffs between two trees.
Diff implementations is referred from go-git's (*git.Worktree).Status() method.
func SortCloneSets ¶
func SortCloneSets(sets []*CloneSet)
Types ¶
type Clone ¶
type CloneSet ¶
func (*CloneSet) ChangedProportion ¶
type Searcher ¶
type Searcher interface {
Files() ([]string, error)
Open(name string) (SearcherFile, error)
}
Searcher is an interface for use with clone search backend implementations.
func NewSearcherFromTree ¶
type SearcherFile ¶
type Tree ¶
type Tree interface {
// String should return a short human-readable representation of this tree.
String() string
// Tree MAY return concrete go-git tree implementation, for use with direct comparison from the other tree
// and with the go-git embedded rename detection function.
//
// If Tree() returns false, comparison will fallback to Noder() diffing.
Tree() (t *object.Tree, err error, ok bool)
// Noder returns noder.Noder for diffing changes from the other noder.Noder instance.
Noder() (noder.Noder, error)
// FilterIgnoredChanges SHOULD filter ignored changes (such as paths specified in .gitignore), if any.
FilterIgnoredChanges(changes merkletrie.Changes) merkletrie.Changes
// ReadFile opens and reads file contents specified by path.
ReadFile(path string) (string, error)
}
Tree represents a tree-like filesystem with various backends. Tree interface is used for comparison between two filesystem snapshots without depending on a specific backend implementation.
func NewGoGitCommitTree ¶
func NewGoGitWorkTree ¶
Click to show internal directories.
Click to hide internal directories.