diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2021-09-20 21:45:10 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-20 21:45:10 -0400 |
| commit | ba01547d4a8190d5e4df317d4b0d0767e160bc57 (patch) | |
| tree | e2d4d5b54a684f0f5e3b3ae33cdcb3b5e0089cd1 /include/git2/sys | |
| parent | 0a8728622ecf77ce4185139761b31f0c6f77f04e (diff) | |
| parent | ba3595af0f3f788427868abb0b499da9f82dc9d1 (diff) | |
| download | libgit2-ba01547d4a8190d5e4df317d4b0d0767e160bc57.tar.gz | |
Merge pull request #6061 from libgit2/ethomson/email
Introduce `git_email_create`; deprecate `git_diff_format_email`
Diffstat (limited to 'include/git2/sys')
| -rw-r--r-- | include/git2/sys/email.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/include/git2/sys/email.h b/include/git2/sys/email.h new file mode 100644 index 000000000..6f4a28662 --- /dev/null +++ b/include/git2/sys/email.h @@ -0,0 +1,45 @@ +/* + * Copyright (C) the libgit2 contributors. All rights reserved. + * + * This file is part of libgit2, distributed under the GNU GPL v2 with + * a Linking Exception. For full terms see the included COPYING file. + */ +#ifndef INCLUDE_sys_git_email_h__ +#define INCLUDE_sys_git_email_h__ + +/** + * @file git2/sys/email.h + * @brief Advanced git email creation routines + * @defgroup git_email Advanced git email creation routines + * @ingroup Git + * @{ + */ +GIT_BEGIN_DECL + +/** + * Create a diff for a commit in mbox format for sending via email. + * + * @param out buffer to store the e-mail patch in + * @param diff the changes to include in the email + * @param patch_idx the patch index + * @param patch_count the total number of patches that will be included + * @param commit_id the commit id for this change + * @param summary the commit message for this change + * @param body optional text to include above the diffstat + * @param author the person who authored this commit + * @param opts email creation options + */ +GIT_EXTERN(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); + +/** @} */ +GIT_END_DECL +#endif |
