libgit2/libgit2 — pull request #652 by nulltoken (2012-04-29 20:41:43+00:00)
Title: diff: provide more context to the consumer of the callbacks

Update the diff callbacks to provide some information related to the file change being processed and the range of the hunk, when applicable.

The need for this fix has been identified by @yorah while implementing the Diff API in LibGit2Sharp (cf . libgit2/libgit2sharp#136).

Additionally, I've added a tiny accessor `git_buf_len()` which I've always missed.
If you think it's inappropriate I'll gladly remove it from the PR and will keep on digging into the buffer code to find out if I'm supposed to use the `size`or `asize` property :-)