summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2015-12-01 10:03:56 +0100
committerPatrick Steinhardt <ps@pks.im>2015-12-01 10:07:00 +0100
commit7f8fe1d45e086adc9e7f3f0c33b624eeb3774033 (patch)
tree638145f66aaa879b564d46e034eb7298a4de8070 /include
parent337b2b08f46ea77d61fa66657ad62d8702bc233a (diff)
downloadlibgit2-7f8fe1d45e086adc9e7f3f0c33b624eeb3774033.tar.gz
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`.
Diffstat (limited to 'include')
-rw-r--r--include/git2/commit.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/git2/commit.h b/include/git2/commit.h
index 04711c1fa..34d29ed81 100644
--- a/include/git2/commit.h
+++ b/include/git2/commit.h
@@ -128,6 +128,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.
*
* @param commit a previously loaded commit.