src-d / go-git

Project has been moved to: https://github.com/go-git/go-git
https://github.com/go-git/go-git
Apache License 2.0
4.91k stars 541 forks source link

How to diff <branch> <branch>? #1263

Open Daniel-Wang opened 4 years ago

Daniel-Wang commented 4 years ago

I looked through all the examples but couldn't find the way to get the hash of a branch, and then use Tree.Diff to get the diff of two branches.

What would the code look like to do this?