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 /src/commit.c | |
parent | 0ecf0e3397502d61787b4e45c3d27fb55b6f9d04 (diff) | |
parent | f98131be911df5e4c47e51ac92e6e7de79e30219 (diff) | |
download | libgit2-96882f201a21ce2a07678b84cf1df0afa41402f9.tar.gz |
Merge pull request #4586 from emilio/mailmap
Add mailmap support.
Diffstat (limited to 'src/commit.c')
-rw-r--r-- | src/commit.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/commit.c b/src/commit.c index e0c090aa8..e0ba51d47 100644 --- a/src/commit.c +++ b/src/commit.c @@ -11,6 +11,7 @@ #include "git2/object.h" #include "git2/repository.h" #include "git2/signature.h" +#include "git2/mailmap.h" #include "git2/sys/commit.h" #include "odb.h" @@ -889,3 +890,15 @@ cleanup: git_buf_dispose(&commit); return error; } + +int git_commit_committer_with_mailmap( + git_signature **out, const git_commit *commit, const git_mailmap *mailmap) +{ + return git_mailmap_resolve_signature(out, mailmap, commit->committer); +} + +int git_commit_author_with_mailmap( + git_signature **out, const git_commit *commit, const git_mailmap *mailmap) +{ + return git_mailmap_resolve_signature(out, mailmap, commit->author); +} |