diff options
author | Russell Belfer <rb@github.com> | 2012-08-14 11:30:18 -0700 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2012-08-14 11:30:18 -0700 |
commit | 3a6bc301c56933672e5c84e3bb2b62a7491391b0 (patch) | |
tree | 27c096b0f8a9e0d47fbcd5b7b1b3bfd55831f7ab /include/git2/message.h | |
parent | e08ca0d4a78847ca16a8634b75b877142f685de1 (diff) | |
parent | 85a0e28b80e42a52247e16478b5f75475b00e56b (diff) | |
download | libgit2-3a6bc301c56933672e5c84e3bb2b62a7491391b0.tar.gz |
Merge pull request #875 from arrbee/fix-message-prettify-length-check
Fix message prettify length check
Diffstat (limited to 'include/git2/message.h')
-rw-r--r-- | include/git2/message.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/git2/message.h b/include/git2/message.h index 7f2558583..b42cb7677 100644 --- a/include/git2/message.h +++ b/include/git2/message.h @@ -23,8 +23,9 @@ GIT_BEGIN_DECL * * Optionally, can remove lines starting with a "#". * - * @param message_out The user allocated buffer which will be filled with - * the cleaned up message. + * @param message_out The user allocated buffer which will be filled with + * the cleaned up message. Pass NULL if you just want to get the size of the + * prettified message as the output value. * * @param size The size of the allocated buffer message_out. * @@ -32,7 +33,8 @@ GIT_BEGIN_DECL * * @param strip_comments 1 to remove lines starting with a "#", 0 otherwise. * - * @return GIT_SUCCESS or an error code + * @return -1 on error, else number of characters in prettified message + * including the trailing NUL byte */ GIT_EXTERN(int) git_message_prettify(char *message_out, size_t buffer_size, const char *message, int strip_comments); |