Skip to main content

Module blob

Module blob 

Source
Available on crate feature blob only.
Expand description

For using text diffs, please have a look at the imara-diff documentation, maintained by Pascal Kuthe.

Modules§

pipeline
platform
sources
Modified for gitoxide from the upstream imara-diff crate. Upstream source: git cat-file -p 32d1e45d3df061e6ccba6db7fdce92db29e345d8:src/sources.rs
unified_diff
Facilities to render a computed Diff as unified diff output. Facilities to produce the unified diff format.

Structs§

Diff
Represents the difference between two sequences of tokens.
DiffLineStats
Information about the diff performed to detect similarity.
Driver
A set of values to define how to diff something that is associated with it using git-attributes, relevant for regular files.
Hunk
A single change in a Diff that represents a range of tokens (before) in the first sequence that were replaced by a different range of tokens in the second sequence (after).
HunkIter
Yields all Hunks in a file in monotonically increasing order. Monotonically increasing means here that the following holds for any two consecutive Hunks x and y:
IndentHeuristic
A slider heuristic that uses indentation levels to determine the best hunk position.
IndentLevel
Represents the indentation level of a line.
InternedInput
Two lists of interned tokens that a Diff can be computed from.
Interner
An interner that allows for fast access of tokens produced by a TokenSource.
NoSliderHeuristic
A slider heuristic that doesn’t adjust hunk positions.
Pipeline
A conversion pipeline to take an object or path from what’s stored in git to what can be diffed, while following the guidance of git-attributes at the respective path to learn if diffing should happen or if the content is considered binary.
Platform
A utility for performing a diff of two blobs, including flexible conversions, conversion-caching acquisition of diff information. Note that this instance will not call external filters as their output can’t be known programmatically, but it allows to prepare their input if the caller wishes to perform this task.
Token
A token represented as an interned integer.
UnifiedDiff
A helper that renders a Diff as unified diff output. It can be used to create a textual diff in the format typically output by git or gnu-diff if the -u option is used.

Enums§

Algorithm
imara-diff supports multiple different algorithms for computing an edit sequence. These algorithms have different performance and all produce different output.
ResourceKind
A way to classify a resource suitable for diffing.

Traits§

SliderHeuristic
A trait for heuristics that determine the best position for ambiguous diff hunks.
TokenSource
A trait for types that can be split into tokens for diffing.

Functions§

diff_with_slider_heuristics
Compute a diff with Git’s slider heuristics to produce more intuitive diffs.