diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2015-06-22 11:24:20 -0400 |
|---|---|---|
| committer | Edward Thomson <ethomson@edwardthomson.com> | 2015-06-22 11:24:20 -0400 |
| commit | 0b6ed4f96c7253b97a86f7e88ba4d69888c72382 (patch) | |
| tree | b66690fdb301026533d63be7f0e5fdba40ca1dd4 /include/git2/commit.h | |
| parent | 0c94deb90f1ce0e8caf171c85522c66ceb37a4ab (diff) | |
| parent | a3f42fe8e4cdae8c85ba5d7d7b4c9fd1247d5227 (diff) | |
| download | libgit2-0b6ed4f96c7253b97a86f7e88ba4d69888c72382.tar.gz | |
Merge pull request #3240 from libgit2/cmn/commit-header-field
commit: allow retrieving an arbitrary header field
Diffstat (limited to 'include/git2/commit.h')
| -rw-r--r-- | include/git2/commit.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/git2/commit.h b/include/git2/commit.h index fb53a701b..04711c1fa 100644 --- a/include/git2/commit.h +++ b/include/git2/commit.h @@ -240,6 +240,17 @@ GIT_EXTERN(int) git_commit_nth_gen_ancestor( unsigned int n); /** + * Get an arbitrary header field + * + * @param out the buffer to fill + * @param commit the commit to look in + * @param field the header field to return + * @return 0 on succeess, GIT_ENOTFOUND if the field does not exist, + * or an error code + */ +GIT_EXTERN(int) git_commit_header_field(git_buf *out, const git_commit *commit, const char *field); + +/** * Create new commit in the repository from a list of `git_object` pointers * * The message will **not** be cleaned up automatically. You can do that |
