libgit2

git_email_create_from_diff

Version:

Create a diff for a commit in mbox format for sending via email.

Signature

int git_email_create_from_diff(git_buf *out, git_diff *diff, size_t patch_idx, size_t patch_count, const git_oid *commit_id, const char *summary, const char *body, const git_signature *author, const git_email_create_options *opts);

Parameters

In
out

buffer to store the e-mail patch in

In
diff

the changes to include in the email

size_t
In
patch_idx

the patch index

size_t
In
patch_count

the total number of patches that will be included

In
commit_id

the commit id for this change

const char *
In
summary

the commit message for this change

const char *
In
body

optional text to include above the diffstat

In
author

the person who authored this commit

In
opts

email creation options

Returns

int

0 on success or an error code

Versions