[libgit2-glib: 21/21] Fix ggit_message_prettify
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgit2-glib: 21/21] Fix ggit_message_prettify
- Date: Sun, 22 Jun 2014 13:32:48 +0000 (UTC)
commit 88760bd027ca7a53ff52aa6d2569285a3571ae40
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Sun Jun 22 15:32:24 2014 +0200
Fix ggit_message_prettify
libgit2-glib/ggit-message.c | 8 +++++---
libgit2-glib/ggit-message.h | 3 ++-
2 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/libgit2-glib/ggit-message.c b/libgit2-glib/ggit-message.c
index a515396..2d62a1d 100644
--- a/libgit2-glib/ggit-message.c
+++ b/libgit2-glib/ggit-message.c
@@ -26,24 +26,26 @@
* ggit_message_prettify:
* @message: the message.
* @strip_comments: whether to strip comments.
+ * @comment_char: comment character.
*
* Prettify a commit message by removing excess whitespace and making sure the
* last line ends with a newline. If @strip_comments is %TRUE, then lines
- * starting with a '#' will be removed.
+ * starting with a @comment_char will be removed.
*
* Returns: the prettified message.
*
*/
gchar *
ggit_message_prettify (const gchar *message,
- gboolean strip_comments)
+ gboolean strip_comments,
+ gchar comment_char)
{
git_buf buf;
gchar *d;
git_buf_set(&buf, message, strlen (message));
- git_message_prettify (&buf, message, strip_comments);
+ git_message_prettify (&buf, message, strip_comments, comment_char);
d = g_strdup (buf.ptr);
git_buf_free (&buf);
diff --git a/libgit2-glib/ggit-message.h b/libgit2-glib/ggit-message.h
index fbd3ff1..7fe26d6 100644
--- a/libgit2-glib/ggit-message.h
+++ b/libgit2-glib/ggit-message.h
@@ -26,7 +26,8 @@
G_BEGIN_DECLS
gchar *ggit_message_prettify (const gchar *message,
- gboolean strip_comments);
+ gboolean strip_comments,
+ gchar comment_char);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]