git_diff_blob_to_buffer

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_t.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.

@param old_blob Blob for old side of diff, or null for empty blob @param old_as_path Treat old blob as if it had this filename; can be null @param buffer Raw data for new side of diff, or null for empty @param buffer_len Length of raw data for new side of diff @param buffer_as_path Treat buffer as if it had this filename; can be null @param options Options for diff, or null for default options @param file_cb Callback for "file"; made once if there is a diff; can be null @param binary_cb Callback for binary files; can be null @param hunk_cb Callback for each hunk in diff; can be null @param line_cb Callback for each line in diff; can be null @param payload Payload passed to each callback function @return 0 on success, non-zero callback return value, or error code

extern (C) nothrow @nogc
int
git_diff_blob_to_buffer

Meta