mirror of
https://git.proxmox.com/git/libgit2
synced 2026-08-26 20:08:02 +00:00
commit: allow retrieving an arbitrary header field
This allows the user to look up fields which we don't parse in libgit2, and allows them to access gpgsig or mergetag fields if they wish to check the signature.
This commit is contained in:
@@ -239,6 +239,17 @@ GIT_EXTERN(int) git_commit_nth_gen_ancestor(
|
||||
const git_commit *commit,
|
||||
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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user