Skip to content

Commit

Permalink
fix: bump check error
Browse files Browse the repository at this point in the history
  • Loading branch information
LuuuXXX committed Mar 14, 2024
1 parent 7065f0e commit c1c1c1f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions crates/xtask-bump-check/src/xtask.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,12 @@ fn changed<'r, 'ws>(
(relative_pkg_root, pkg)
})
.collect::<Vec<_>>();
let base_tree = base_commit.as_object().peel_to_tree()?;
// Using a "symmetric difference" between base and head.
let ancestor_oid = repo.merge_base(base_commit.id(), head.id()).unwrap();
let ancestor_commit = repo.find_commit(ancestor_oid).unwrap();
let ancestor_base_tree = ancestor_commit.as_object().peel_to_tree()?;
let head_tree = head.as_object().peel_to_tree()?;
let diff = repo.diff_tree_to_tree(Some(&base_tree), Some(&head_tree), Default::default())?;
let diff = repo.diff_tree_to_tree(Some(&ancestor_base_tree), Some(&head_tree), Default::default())?;

let mut changed_members = HashMap::new();

Expand Down

0 comments on commit c1c1c1f

Please sign in to comment.