@@ -19,6 +19,7 @@ pub enum Kind {
1919
2020#[ cfg( any( feature = "attributes" , feature = "excludes" ) ) ]
2121pub mod attributes;
22+ ///
2223#[ cfg( feature = "blame" ) ]
2324mod blame;
2425mod cache;
@@ -96,13 +97,28 @@ mod new_commit_as {
9697///
9798#[ cfg( feature = "blame" ) ]
9899pub mod blame_file {
100+ /// Options to be passed to [Repository::blame_file()](crate::Repository::blame_file()).
101+ #[ derive( Default , Debug , Clone ) ]
102+ pub struct Options {
103+ /// The algorithm to use for diffing. If `None`, `diff.algorithm` will be used.
104+ pub diff_algorithm : Option < gix_diff:: blob:: Algorithm > ,
105+ /// The ranges to blame in the file.
106+ pub ranges : gix_blame:: BlameRanges ,
107+ /// Don't consider commits before the given date.
108+ pub since : Option < gix_date:: Time > ,
109+ /// Determine if rename tracking should be performed, and how.
110+ pub rewrites : Option < gix_diff:: Rewrites > ,
111+ }
112+
99113 /// The error returned by [Repository::blame_file()](crate::Repository::blame_file()).
100114 #[ derive( Debug , thiserror:: Error ) ]
101115 #[ allow( missing_docs) ]
102116 pub enum Error {
103117 #[ error( transparent) ]
104118 CommitGraphIfEnabled ( #[ from] super :: commit_graph_if_enabled:: Error ) ,
105119 #[ error( transparent) ]
120+ DiffAlgorithm ( #[ from] crate :: config:: diff:: algorithm:: Error ) ,
121+ #[ error( transparent) ]
106122 DiffResourceCache ( #[ from] super :: diff_resource_cache:: Error ) ,
107123 #[ error( transparent) ]
108124 Blame ( #[ from] gix_blame:: Error ) ,
0 commit comments