~/selfhut

b61a608347a7f9a8c6e4bf1292d77a68a17dada2 — Arthur Melton 628f9ab9 2 years ago
cargo fmt
1 files changed, 4 insertions(+), 1 deletions(-)

M src/git/diffs.rs
M src/git/diffs.rs => src/git/diffs.rs +4 -1
@@ 2,7 2,10 @@ pub fn diffs<'a>(commit: git2::Commit<'a>, repo: &'a git2::Repository) -> Option

    let tree = commit.tree().ok()?;
    let parent_tree = match commit.parent(0) {
        Ok(parent) => Some(parent.tree().ok()?),
        Err(_) => Some(repo.find_tree(git2::Oid::from_str("4b825dc642cb6eb9a060e54bf8d69288fbee4904").ok()?).ok()?),
        Err(_) => Some(
            repo.find_tree(git2::Oid::from_str("4b825dc642cb6eb9a060e54bf8d69288fbee4904").ok()?)
                .ok()?,
        ),
    }?;
    match repo.diff_tree_to_tree(Some(&parent_tree), Some(&tree), None) {
        Ok(diff) => Some(diff),