Skip to content

Commit

Permalink
revset: pass valid file paths to diff_contains() error
Browse files Browse the repository at this point in the history
  • Loading branch information
yuja committed Aug 13, 2024
1 parent 145f942 commit c651930
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/src/default_index/revset_engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1169,7 +1169,7 @@ fn matches_diff_from_parent(
text_pattern: &StringPattern,
files_matcher: &dyn Matcher,
) -> BackendResult<bool> {
let copy_records = Default::default();
let copy_records = Default::default(); // TODO handle copy tracking
let parents: Vec<_> = commit.parents().try_collect()?;
let from_tree =
rewrite::merge_commit_trees_no_resolve_without_repo(store, &index, &parents)?.resolve()?;
Expand All @@ -1180,14 +1180,14 @@ fn matches_diff_from_parent(
let mut diff_stream = materialized_diff_stream(store, tree_diff);
async {
while let Some(MaterializedTreeDiffEntry {
source: _, // TODO handle copy tracking
target: path,
source,
target,
value: diff,
}) = diff_stream.next().await
{
let (left_value, right_value) = diff?;
let left_content = to_file_content(&path, left_value)?;
let right_content = to_file_content(&path, right_value)?;
let left_content = to_file_content(&source, left_value)?;
let right_content = to_file_content(&target, right_value)?;
// Filter lines prior to comparison. This might produce inferior
// hunks due to lack of contexts, but is way faster than full diff.
let left_lines = match_lines(&left_content, text_pattern);
Expand Down

0 comments on commit c651930

Please sign in to comment.