Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/smanonr..../opt/imh-pyth.../include/git2
File: mailmap.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_mailmap_h__
[6] Fix | Delete
#define INCLUDE_git_mailmap_h__
[7] Fix | Delete
[8] Fix | Delete
#include "common.h"
[9] Fix | Delete
#include "types.h"
[10] Fix | Delete
#include "buffer.h"
[11] Fix | Delete
[12] Fix | Delete
/**
[13] Fix | Delete
* @file git2/mailmap.h
[14] Fix | Delete
* @brief Mailmap parsing routines
[15] Fix | Delete
* @defgroup git_mailmap Git mailmap routines
[16] Fix | Delete
* @ingroup Git
[17] Fix | Delete
* @{
[18] Fix | Delete
*/
[19] Fix | Delete
GIT_BEGIN_DECL
[20] Fix | Delete
[21] Fix | Delete
/**
[22] Fix | Delete
* Allocate a new mailmap object.
[23] Fix | Delete
*
[24] Fix | Delete
* This object is empty, so you'll have to add a mailmap file before you can do
[25] Fix | Delete
* anything with it. The mailmap must be freed with 'git_mailmap_free'.
[26] Fix | Delete
*
[27] Fix | Delete
* @param out pointer to store the new mailmap
[28] Fix | Delete
* @return 0 on success, or an error code
[29] Fix | Delete
*/
[30] Fix | Delete
GIT_EXTERN(int) git_mailmap_new(git_mailmap **out);
[31] Fix | Delete
[32] Fix | Delete
/**
[33] Fix | Delete
* Free the mailmap and its associated memory.
[34] Fix | Delete
*
[35] Fix | Delete
* @param mm the mailmap to free
[36] Fix | Delete
*/
[37] Fix | Delete
GIT_EXTERN(void) git_mailmap_free(git_mailmap *mm);
[38] Fix | Delete
[39] Fix | Delete
/**
[40] Fix | Delete
* Add a single entry to the given mailmap object. If the entry already exists,
[41] Fix | Delete
* it will be replaced with the new entry.
[42] Fix | Delete
*
[43] Fix | Delete
* @param mm mailmap to add the entry to
[44] Fix | Delete
* @param real_name the real name to use, or NULL
[45] Fix | Delete
* @param real_email the real email to use, or NULL
[46] Fix | Delete
* @param replace_name the name to replace, or NULL
[47] Fix | Delete
* @param replace_email the email to replace
[48] Fix | Delete
* @return 0 on success, or an error code
[49] Fix | Delete
*/
[50] Fix | Delete
GIT_EXTERN(int) git_mailmap_add_entry(
[51] Fix | Delete
git_mailmap *mm, const char *real_name, const char *real_email,
[52] Fix | Delete
const char *replace_name, const char *replace_email);
[53] Fix | Delete
[54] Fix | Delete
/**
[55] Fix | Delete
* Create a new mailmap instance containing a single mailmap file
[56] Fix | Delete
*
[57] Fix | Delete
* @param out pointer to store the new mailmap
[58] Fix | Delete
* @param buf buffer to parse the mailmap from
[59] Fix | Delete
* @param len the length of the input buffer
[60] Fix | Delete
* @return 0 on success, or an error code
[61] Fix | Delete
*/
[62] Fix | Delete
GIT_EXTERN(int) git_mailmap_from_buffer(
[63] Fix | Delete
git_mailmap **out, const char *buf, size_t len);
[64] Fix | Delete
[65] Fix | Delete
/**
[66] Fix | Delete
* Create a new mailmap instance from a repository, loading mailmap files based
[67] Fix | Delete
* on the repository's configuration.
[68] Fix | Delete
*
[69] Fix | Delete
* Mailmaps are loaded in the following order:
[70] Fix | Delete
* 1. '.mailmap' in the root of the repository's working directory, if present.
[71] Fix | Delete
* 2. The blob object identified by the 'mailmap.blob' config entry, if set.
[72] Fix | Delete
* [NOTE: 'mailmap.blob' defaults to 'HEAD:.mailmap' in bare repositories]
[73] Fix | Delete
* 3. The path in the 'mailmap.file' config entry, if set.
[74] Fix | Delete
*
[75] Fix | Delete
* @param out pointer to store the new mailmap
[76] Fix | Delete
* @param repo repository to load mailmap information from
[77] Fix | Delete
* @return 0 on success, or an error code
[78] Fix | Delete
*/
[79] Fix | Delete
GIT_EXTERN(int) git_mailmap_from_repository(
[80] Fix | Delete
git_mailmap **out, git_repository *repo);
[81] Fix | Delete
[82] Fix | Delete
/**
[83] Fix | Delete
* Resolve a name and email to the corresponding real name and email.
[84] Fix | Delete
*
[85] Fix | Delete
* The lifetime of the strings are tied to `mm`, `name`, and `email` parameters.
[86] Fix | Delete
*
[87] Fix | Delete
* @param real_name pointer to store the real name
[88] Fix | Delete
* @param real_email pointer to store the real email
[89] Fix | Delete
* @param mm the mailmap to perform a lookup with (may be NULL)
[90] Fix | Delete
* @param name the name to look up
[91] Fix | Delete
* @param email the email to look up
[92] Fix | Delete
* @return 0 on success, or an error code
[93] Fix | Delete
*/
[94] Fix | Delete
GIT_EXTERN(int) git_mailmap_resolve(
[95] Fix | Delete
const char **real_name, const char **real_email,
[96] Fix | Delete
const git_mailmap *mm, const char *name, const char *email);
[97] Fix | Delete
[98] Fix | Delete
/**
[99] Fix | Delete
* Resolve a signature to use real names and emails with a mailmap.
[100] Fix | Delete
*
[101] Fix | Delete
* Call `git_signature_free()` to free the data.
[102] Fix | Delete
*
[103] Fix | Delete
* @param out new signature
[104] Fix | Delete
* @param mm mailmap to resolve with
[105] Fix | Delete
* @param sig signature to resolve
[106] Fix | Delete
* @return 0 or an error code
[107] Fix | Delete
*/
[108] Fix | Delete
GIT_EXTERN(int) git_mailmap_resolve_signature(
[109] Fix | Delete
git_signature **out, const git_mailmap *mm, const git_signature *sig);
[110] Fix | Delete
[111] Fix | Delete
/** @} */
[112] Fix | Delete
GIT_END_DECL
[113] Fix | Delete
#endif
[114] Fix | Delete
[115] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function