git2-rs
git2-rs copied to clipboard
possible to perform git diff [path1] [path2]?
Hi,
I see Diff is only achievable through some diff_* functions on the Repository structure. However, my goal is to compare two different source code repository which is possible through git native command git diff [path1] [path2]. Is there a way to get similar results through this crate?
Might be better late than never, but you probably want to use Patch to get the necessary information between the two paths. You could either get the two Blobs from each repository and use from_blobs – but I could be wrong, I'm not sure how the lifetimes would lineup 🤔