Directly run a diff on two blobs.
Compared to a file, a blob lacks some contextual information. As such,
the git_diff_file
given to the callback will have some fake data; i.e.
mode
will be 0 and path
will be NULL.
NULL is allowed for either old_blob
or new_blob
and will be treated
as an empty blob, with the oid
set to NULL in the git_diff_file
data.
Passing NULL for both blobs is a noop; no callbacks will be made at all.
We do run a binary content check on the blob content and if either blob
looks like binary data, the git_diff_delta
binary attribute will be set
to 1 and no call to the hunk_cb nor line_cb will be made (unless you pass
GIT_DIFF_FORCE_TEXT
of course).
Treat old blob as if it had this filename; can be NULL
Treat new blob as if it had this filename; can be NULL
Payload passed to each callback function
0 on success, GIT_EUSER on non-zero callback return, or error code