Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/anonr.TX.../opt/imh-pyth.../include/git2
File: message.h
/*
[0] Fix | Delete
* Copyright (C) the libgit2 contributors. All rights reserved.
[1] Fix | Delete
*
[2] Fix | Delete
* This file is part of libgit2, distributed under the GNU GPL v2 with
[3] Fix | Delete
* a Linking Exception. For full terms see the included COPYING file.
[4] Fix | Delete
*/
[5] Fix | Delete
#ifndef INCLUDE_git_message_h__
[6] Fix | Delete
#define INCLUDE_git_message_h__
[7] Fix | Delete
[8] Fix | Delete
#include "common.h"
[9] Fix | Delete
#include "buffer.h"
[10] Fix | Delete
[11] Fix | Delete
/**
[12] Fix | Delete
* @file git2/message.h
[13] Fix | Delete
* @brief Git message management routines
[14] Fix | Delete
* @ingroup Git
[15] Fix | Delete
* @{
[16] Fix | Delete
*/
[17] Fix | Delete
GIT_BEGIN_DECL
[18] Fix | Delete
[19] Fix | Delete
/**
[20] Fix | Delete
* Clean up excess whitespace and make sure there is a trailing newline in the message.
[21] Fix | Delete
*
[22] Fix | Delete
* Optionally, it can remove lines which start with the comment character.
[23] Fix | Delete
*
[24] Fix | Delete
* @param out The user-allocated git_buf which will be filled with the
[25] Fix | Delete
* cleaned up message.
[26] Fix | Delete
*
[27] Fix | Delete
* @param message The message to be prettified.
[28] Fix | Delete
*
[29] Fix | Delete
* @param strip_comments Non-zero to remove comment lines, 0 to leave them in.
[30] Fix | Delete
*
[31] Fix | Delete
* @param comment_char Comment character. Lines starting with this character
[32] Fix | Delete
* are considered to be comments and removed if `strip_comments` is non-zero.
[33] Fix | Delete
*
[34] Fix | Delete
* @return 0 or an error code.
[35] Fix | Delete
*/
[36] Fix | Delete
GIT_EXTERN(int) git_message_prettify(git_buf *out, const char *message, int strip_comments, char comment_char);
[37] Fix | Delete
[38] Fix | Delete
/**
[39] Fix | Delete
* Represents a single git message trailer.
[40] Fix | Delete
*/
[41] Fix | Delete
typedef struct {
[42] Fix | Delete
const char *key;
[43] Fix | Delete
const char *value;
[44] Fix | Delete
} git_message_trailer;
[45] Fix | Delete
[46] Fix | Delete
/**
[47] Fix | Delete
* Represents an array of git message trailers.
[48] Fix | Delete
*
[49] Fix | Delete
* Struct members under the private comment are private, subject to change
[50] Fix | Delete
* and should not be used by callers.
[51] Fix | Delete
*/
[52] Fix | Delete
typedef struct {
[53] Fix | Delete
git_message_trailer *trailers;
[54] Fix | Delete
size_t count;
[55] Fix | Delete
[56] Fix | Delete
/* private */
[57] Fix | Delete
char *_trailer_block;
[58] Fix | Delete
} git_message_trailer_array;
[59] Fix | Delete
[60] Fix | Delete
/**
[61] Fix | Delete
* Parse trailers out of a message, filling the array pointed to by +arr+.
[62] Fix | Delete
*
[63] Fix | Delete
* Trailers are key/value pairs in the last paragraph of a message, not
[64] Fix | Delete
* including any patches or conflicts that may be present.
[65] Fix | Delete
*
[66] Fix | Delete
* @param arr A pre-allocated git_message_trailer_array struct to be filled in
[67] Fix | Delete
* with any trailers found during parsing.
[68] Fix | Delete
* @param message The message to be parsed
[69] Fix | Delete
* @return 0 on success, or non-zero on error.
[70] Fix | Delete
*/
[71] Fix | Delete
GIT_EXTERN(int) git_message_trailers(git_message_trailer_array *arr, const char *message);
[72] Fix | Delete
[73] Fix | Delete
/**
[74] Fix | Delete
* Clean's up any allocated memory in the git_message_trailer_array filled by
[75] Fix | Delete
* a call to git_message_trailers.
[76] Fix | Delete
*/
[77] Fix | Delete
GIT_EXTERN(void) git_message_trailer_array_free(git_message_trailer_array *arr);
[78] Fix | Delete
[79] Fix | Delete
/** @} */
[80] Fix | Delete
GIT_END_DECL
[81] Fix | Delete
[82] Fix | Delete
#endif /* INCLUDE_git_message_h__ */
[83] Fix | Delete
[84] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function