Skip to content

Commit 1ef6a7d

Browse files
committed
Get diff algorithm from repo
1 parent b97bc57 commit 1ef6a7d

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

asyncgit/src/error.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,12 @@ pub enum Error {
139139
#[from] Box<gix::repository::diff_resource_cache::Error>,
140140
),
141141

142+
///
143+
#[error("gix::config::diff::algorithm error: {0}")]
144+
GixConfigDiffAlgorithm(
145+
#[from] gix::config::diff::algorithm::Error,
146+
),
147+
142148
///
143149
#[error("gix_blame error: {0}")]
144150
GixBlame(#[from] gix_blame::Error),

asyncgit/src/sync/blame.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,13 @@ pub fn blame_file(
6161
let mut resource_cache =
6262
repo.diff_resource_cache_for_tree_diff()?;
6363

64-
let options: gix_blame::Options = Default::default();
64+
let diff_algorithm = repo.diff_algorithm()?;
65+
66+
let options: gix_blame::Options = gix_blame::Options {
67+
diff_algorithm,
68+
range: None,
69+
since: None,
70+
};
6571

6672
let outcome = gix_blame::file(
6773
&repo.objects,

0 commit comments

Comments
 (0)