Skip to content

Commit

Permalink
adapt to changes in git-repository (#470)
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Sep 20, 2022
1 parent 79c2255 commit 5ec714f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cargo-smart-release/src/git/history.rs
Expand Up @@ -237,10 +237,10 @@ fn add_item_if_package_changed<'a>(
let mut repo = ctx.repo.clone();
repo.object_cache_size(1024 * 1024);
let current = git::Tree::from_data(item.id, data_by_tree_id[&item.tree_id].to_owned(), &ctx.repo)
.lookup_path(components.iter().copied())?;
.lookup_entry(components.iter().copied())?;
let parent = match item.parent_tree_id {
Some(tree_id) => git::Tree::from_data(tree_id, data_by_tree_id[&tree_id].to_owned(), &ctx.repo)
.lookup_path(components.iter().copied())?,
.lookup_entry(components.iter().copied())?,
None => None,
};
match (current, parent) {
Expand Down
4 changes: 2 additions & 2 deletions cargo-smart-release/src/git/mod.rs
Expand Up @@ -47,14 +47,14 @@ pub fn change_since_last_release(package: &Package, ctx: &crate::Context) -> any
.object()?
.peel_to_kind(object::Kind::Tree)?
.into_tree()
.lookup_path(components.clone())?
.lookup_entry(components.clone())?
.expect("path must exist in current commit")
.oid;
let released_dir_id = released_target
.object()?
.peel_to_kind(object::Kind::Tree)?
.into_tree()
.lookup_path(components)?
.lookup_entry(components)?
.expect("path must exist as it was supposedly released there")
.oid;

Expand Down

0 comments on commit 5ec714f

Please sign in to comment.