diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2018-06-18 10:13:11 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-06-18 10:13:11 +0100 |
| commit | 96882f201a21ce2a07678b84cf1df0afa41402f9 (patch) | |
| tree | 447bd4a4edab034d9c88c8b4e9b93ccb126aa250 /include/git2/commit.h | |
| parent | 0ecf0e3397502d61787b4e45c3d27fb55b6f9d04 (diff) | |
| parent | f98131be911df5e4c47e51ac92e6e7de79e30219 (diff) | |
| download | libgit2-96882f201a21ce2a07678b84cf1df0afa41402f9.tar.gz | |
Merge pull request #4586 from emilio/mailmap
Add mailmap support.
Diffstat (limited to 'include/git2/commit.h')
| -rw-r--r-- | include/git2/commit.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/include/git2/commit.h b/include/git2/commit.h index 692b3bdd9..50f2fc963 100644 --- a/include/git2/commit.h +++ b/include/git2/commit.h @@ -173,6 +173,34 @@ GIT_EXTERN(const git_signature *) git_commit_committer(const git_commit *commit) GIT_EXTERN(const git_signature *) git_commit_author(const git_commit *commit); /** + * Get the committer of a commit, using the mailmap to map names and email + * addresses to canonical real names and email addresses. + * + * Call `git_signature_free` to free the signature. + * + * @param out a pointer to store the resolved signature. + * @param commit a previously loaded commit. + * @param mailmap the mailmap to resolve with. (may be NULL) + * @return 0 or an error code + */ +GIT_EXTERN(int) git_commit_committer_with_mailmap( + git_signature **out, const git_commit *commit, const git_mailmap *mailmap); + +/** + * Get the author of a commit, using the mailmap to map names and email + * addresses to canonical real names and email addresses. + * + * Call `git_signature_free` to free the signature. + * + * @param out a pointer to store the resolved signature. + * @param commit a previously loaded commit. + * @param mailmap the mailmap to resolve with. (may be NULL) + * @return 0 or an error code + */ +GIT_EXTERN(int) git_commit_author_with_mailmap( + git_signature **out, const git_commit *commit, const git_mailmap *mailmap); + +/** * Get the full raw text of the commit header. * * @param commit a previously loaded commit |
