I'd like to use grit for code review, so I needed to parse the Commit diff and get individual hunks. I figure this is generic functionality that can and should go into grit, so I added a patch.
The old tests pass, sans a small difference -- right now, Commit.diff will never return nil; I figured it doesn't make sense that sometimes it would return nil, and sometimes it would return an empty string, so now it'll always return an empty string when it used to return nil.
I hope you'll consider merging my change, and thank you very much for the awesome code!
Rebased against mojombo/master to get the latest commits. All the tests pass.
Rebased against mojombo/master again. Is there any chance you could take a look at this, please?
Rebased against mojombo/master again.
Added parsing for individual hunks inside commit diff.
Grit is no longer maintained. See #183 and check out libgit2/rugged.