Expand description
Which lines of which files to analyse (--since, --lines).
Structs§
- Hunk
- One hunk of
git diff -U0: where the new lines are, and the lines that were there. - Scope
- Line ranges per file. Paths are relative to the workspace root, with
/separators.
Functions§
- hunks
- The hunks of the files that are still there. The lines of a hunk are counted as its
header says, so a removed line that starts with
--is not taken for a file header. - line_
count - Number of lines in
source(0 for an empty file). - line_of
- 1-based line of the byte at
offset. - matches_
any_ glob - Returns
trueifpathmatches any glob pattern inpatterns. - matches_
glob - Matches a package-relative path against a simple glob pattern supporting
*(any chars except/),?(one char except/), and**(zero or more path segments/chars). Runs inO(pattern.len() * path.len())time andO(path.len())memory. - parse_
line_ spec - Parses one
--linesspecification:FILE,FILE:LINE, orFILE:FROM-TO(1-based, inclusive). - range_
of - Where the new lines of a hunk are in
text, as a byte range: empty, at the place the old lines were, when the hunk has no new lines. - undo
textwith the hunks undone: the old lines where the new ones are. The hunks are of this text and do not overlap.Nonewhen one of them does not fit the text.