Skip to content

Commit

Permalink
Merge pull request #614 from yuja/push-utqlvwnvuwrl
Browse files Browse the repository at this point in the history
Fix dir-diff paths merging to not add duplicated entries from remainder
  • Loading branch information
Wilfred authored Jan 5, 2024
2 parents 35a182d + 19e21cd commit 50a03b4
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/files.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,18 @@ pub(crate) fn relative_paths_in_either(lhs_dir: &Path, rhs_dir: &Path) -> Vec<Pa
}
}

paths.extend(lhs_paths.into_iter().skip(i));
paths.extend(rhs_paths.into_iter().skip(j));
paths.extend(
lhs_paths[i..]
.iter()
.filter(|&path| !seen.contains(path))
.cloned(),
);
paths.extend(
rhs_paths[j..]
.iter()
.filter(|&path| !seen.contains(path))
.cloned(),
);

paths
}
Expand Down

0 comments on commit 50a03b4

Please sign in to comment.