rust-lang / git2-rs

libgit2 bindings for Rust
https://docs.rs/git2
Apache License 2.0
1.64k stars 380 forks source link

Find files added between two commits #1001

Closed ppoliani closed 7 months ago

ppoliani commented 7 months ago

Is there an example of how to get all the files added between two commits?

Basically something similar to git diff 790f2dd..0543c44

I have checked the diff example and I tried to use the diff_tree_to_tree method, but it seems to include all files added until the new_tree and not the ones added between old_tree and new_tree.