Hash :
743a4b3b
Author :
Date :
2012-06-15T22:24:59
message: Expose git_message_prettify() git_commit() and git_tag() no longer prettify the message by default. This has to be taken care of by the caller. This has the nice side effect of putting the caller in position to actually choose to strip the comments or not.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
/*
* 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_git_message_h__
#define INCLUDE_git_message_h__
#include "common.h"
/**
* @file git2/message.h
* @brief Git message management routines
* @ingroup Git
* @{
*/
GIT_BEGIN_DECL
/**
* Clean up message from excess whitespace and make sure that the last line
* ends with a '\n'.
*
* Optionally, can remove lines starting with a "#".
*
* @param message_out The user allocated buffer which will be filled with
* the cleaned up message.
*
* @param size The size of the allocated buffer message_out.
*
* @param message The message to be prettified.
*
* @param strip_comments 1 to remove lines starting with a "#", 0 otherwise.
*
* @return GIT_SUCCESS or an error code
*/
GIT_EXTERN(int) git_message_prettify(char *message_out, size_t buffer_size, const char *message, int strip_comments);
/** @} */
GIT_END_DECL
#endif /* INCLUDE_git_message_h__ */