summaryrefslogtreecommitdiff
path: root/src/message.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 /src/message.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 'src/message.h')
-rw-r--r--src/message.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/message.h b/src/message.h
new file mode 100644
index 000000000..ddfa13e18
--- /dev/null
+++ b/src/message.h
@@ -0,0 +1,14 @@
+/*
+ * Copyright (C) 2009-2012 the libgit2 contributors
+ *
+ * This file is part of libgit2, distributed under the GNU GPL v2 with
+ * a Linking Exception. For full terms see the included COPYING file.
+ */
+#ifndef INCLUDE_message_h__
+#define INCLUDE_message_h__
+
+#include "buffer.h"
+
+int git_message_prettify(git_buf *message_out, const char *message, int strip_comments);
+
+#endif /* INCLUDE_message_h__ */