mirror of
https://github.com/libgit2/libgit2.git
synced 2026-06-22 06:26:26 +00:00
commit: introduce git_commit_body
It is already possible to get a commit's summary with the `git_commit_summary` function. It is not possible to get the remaining part of the commit message, that is the commit message's body. Fix this by introducing a new function `git_commit_body`.
This commit is contained in:
@@ -127,6 +127,19 @@ GIT_EXTERN(const char *) git_commit_message_raw(const git_commit *commit);
|
||||
*/
|
||||
GIT_EXTERN(const char *) git_commit_summary(git_commit *commit);
|
||||
|
||||
/**
|
||||
* Get the long "body" of the git commit message.
|
||||
*
|
||||
* The returned message is the body of the commit, comprising
|
||||
* everything but the first paragraph of the message. Leading and
|
||||
* trailing whitespaces are trimmed.
|
||||
*
|
||||
* @param commit a previously loaded commit.
|
||||
* @return the body of a commit or NULL when no the message only
|
||||
* consists of a summary
|
||||
*/
|
||||
GIT_EXTERN(const char *) git_commit_body(git_commit *commit);
|
||||
|
||||
/**
|
||||
* Get the commit time (i.e. committer time) of a commit.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user