summaryrefslogtreecommitdiff
path: root/include/git2/commit.h
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2012-03-01 17:03:32 +0100
committernulltoken <emeric.fermas@gmail.com>2012-05-07 12:16:04 +0200
commit458b94503d023a07247153f44d34bcc65e6f8103 (patch)
tree02a14a37ebde58cdcf7164f0f362c705e510b201 /include/git2/commit.h
parent9b62e40ecdb92ab7493eac514e1399d791fa6f62 (diff)
downloadlibgit2-458b94503d023a07247153f44d34bcc65e6f8103.tar.gz
commit/tag: ensure the message is cleaned up
'git commit' and 'git tag -a' enforce some conventions, like cleaning up excess whitespace and making sure that the last line ends with a '\n'. This fix replicates this behavior. Fix libgit2/libgit2sharp#117
Diffstat (limited to 'include/git2/commit.h')
-rw-r--r--include/git2/commit.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/git2/commit.h b/include/git2/commit.h
index c274b6b95..e519bc128 100644
--- a/include/git2/commit.h
+++ b/include/git2/commit.h
@@ -182,6 +182,9 @@ GIT_EXTERN(const git_oid *) git_commit_parent_oid(git_commit *commit, unsigned i
* Create a new commit in the repository using `git_object`
* instances as parameters.
*
+ * The message will be cleaned up from excess whitespace
+ * it will be made sure that the last line ends with a '\n'.
+ *
* @param oid Pointer where to store the OID of the
* newly created commit
*
@@ -238,6 +241,9 @@ GIT_EXTERN(int) git_commit_create(
* Create a new commit in the repository using a variable
* argument list.
*
+ * The message will be cleaned up from excess whitespace
+ * it will be made sure that the last line ends with a '\n'.
+ *
* The parents for the commit are specified as a variable
* list of pointers to `const git_commit *`. Note that this
* is a convenience method which may not be safe to export