Directly run a diff between a blob and a buffer.
As with git_diff_blobs
, comparing a blob and buffer lacks some context,
so the git_diff_file
parameters to the callbacks will be faked a la the
rules for git_diff_blobs()
.
Passing NULL for old_blob
will be treated as an empty blob (i.e. the
file_cb
will be invoked with GIT_DELTA_ADDED and the diff will be the
entire content of the buffer added). Passing NULL to the buffer will do
the reverse, with GIT_DELTA_REMOVED and blob content removed.
Treat old blob as if it had this filename; can be NULL
Raw data for new side of diff, or NULL for empty
Length of raw data for new side of diff
Treat buffer as if it had this filename; can be NULL
Payload passed to each callback function
0 on success, non-zero callback return value, or error code