Expand description
Algorithms for diffing various git object types and for generating patches, highly optimized for performance.
§Feature Flags
blob(enabled by default) — Enable diffing of blobs using imara-diff.index(enabled by default) — Enable diffing of two indices, which also allows for a generic rewrite tracking implementation.serde— Data structures implementserde::Serializeandserde::Deserialize.wasm— Make it possible to compile to thewasm32-unknown-unknowntarget.
Re-exports§
pub use gix_command as command;blobpub use gix_object as object;blob
Modules§
- blob
blob - For using text diffs, please have a look at the
imara-diffdocumentation, maintained by Pascal Kuthe. - index
index - rewrites
blob - Contains a Tracker to detect rewrites.
- tree
- tree_
with_ rewrites blob
Structs§
- Rewrites
blob - A structure to capture how to perform rename and copy tracking, used by the rewrites::Tracker.
Functions§
- index
index - Produce an entry-by-entry diff between
lhsandrhs, sending changes tocb(change) -> Actionfor consumption, which would turnlhsintorhsif applied. Usepathspecto reduce the set of entries to look at, andpathspec_attributesmay be used by pathspecs that perform attribute lookups. - tree
- Calculate the changes that would need to be applied to
lhsto getrhsusingobjectsto obtain objects as needed for traversal.statecan be used between multiple calls to re-use memory. - tree_
with_ rewrites blob - Call
for_eachrepeatedly with all changes that are needed to convertlhstorhs. Provide aresource_cacheto speed up obtaining blobs for similarity checks.tree_diff_statecan be used to re-use tree-diff memory between calls.objectsare used to lookup trees while performing the diff. Useoptionsto further configure how the rename tracking is performed.