DiffTree compares the content and mode of the blobs found via two tree objects. DiffTree does not perform rename detection, use DiffTreeWithOptions instead to detect renames.
DiffTreeContext compares the content and mode of the blobs found via two tree objects. Provided context must be non-nil. An error will be returned if context expires.
DiffTreeOptions are the configurable options when performing a diff tree.
DetectRenames is whether the diff tree will use rename detection.
RenameScore is the threshold to of similarity between files to consider that a pair of delete and insert are a rename. The number must be exactly between 0 and 100.
RenameLimit is the maximum amount of files that can be compared when detecting renames. The number of comparisons that have to be performed is equal to the number of deleted files * the number of added files. That means, that if 100 files were deleted and 50 files were added, 5000 file comparisons may be needed. So, if the rename limit is 50, the number of both deleted and added needs to be equal or less than 50. A value of 0 means no limit.
OnlyExactRenames performs only detection of exact renames and will not perform any detection of renames based on file similarity.
DiffTreeWithOptions compares the content and mode of the blobs found via two tree objects with the given options. The provided context must be non-nil. If no options are passed, no rename detection will be performed. The recommended options are DefaultDiffTreeOptions. An error will be returned if the context expires. This function will be deprecated and removed in v6 so the default behaviour of DiffTree is to detect renames.
The pages are generated with Goldsv0.3.2-preview. (GOOS=darwin GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds.