Blame include/git2/message.h

Packit Service 20376f
/*
Packit Service 20376f
 * Copyright (C) the libgit2 contributors. All rights reserved.
Packit Service 20376f
 *
Packit Service 20376f
 * This file is part of libgit2, distributed under the GNU GPL v2 with
Packit Service 20376f
 * a Linking Exception. For full terms see the included COPYING file.
Packit Service 20376f
 */
Packit Service 20376f
#ifndef INCLUDE_git_message_h__
Packit Service 20376f
#define INCLUDE_git_message_h__
Packit Service 20376f
Packit Service 20376f
#include "common.h"
Packit Service 20376f
#include "buffer.h"
Packit Service 20376f
Packit Service 20376f
/**
Packit Service 20376f
 * @file git2/message.h
Packit Service 20376f
 * @brief Git message management routines
Packit Service 20376f
 * @ingroup Git
Packit Service 20376f
 * @{
Packit Service 20376f
 */
Packit Service 20376f
GIT_BEGIN_DECL
Packit Service 20376f
Packit Service 20376f
/**
Packit Service 20376f
 * Clean up message from excess whitespace and make sure that the last line
Packit Service 20376f
 * ends with a '\n'.
Packit Service 20376f
 *
Packit Service 20376f
 * Optionally, can remove lines starting with a "#".
Packit Service 20376f
 *
Packit Service 20376f
 * @param out The user-allocated git_buf which will be filled with the
Packit Service 20376f
 *     cleaned up message.
Packit Service 20376f
 *
Packit Service 20376f
 * @param message The message to be prettified.
Packit Service 20376f
 *
Packit Service 20376f
 * @param strip_comments Non-zero to remove comment lines, 0 to leave them in.
Packit Service 20376f
 *
Packit Service 20376f
 * @param comment_char Comment character. Lines starting with this character
Packit Service 20376f
 * are considered to be comments and removed if `strip_comments` is non-zero.
Packit Service 20376f
 *
Packit Service 20376f
 * @return 0 or an error code.
Packit Service 20376f
 */
Packit Service 20376f
GIT_EXTERN(int) git_message_prettify(git_buf *out, const char *message, int strip_comments, char comment_char);
Packit Service 20376f
Packit Service 20376f
/** @} */
Packit Service 20376f
GIT_END_DECL
Packit Service 20376f
Packit Service 20376f
#endif /* INCLUDE_git_message_h__ */