Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/smanonr..../opt/imh-pyth.../include/git2
File: signature.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_signature_h__
[6] Fix | Delete
#define INCLUDE_git_signature_h__
[7] Fix | Delete
[8] Fix | Delete
#include "common.h"
[9] Fix | Delete
#include "types.h"
[10] Fix | Delete
[11] Fix | Delete
/**
[12] Fix | Delete
* @file git2/signature.h
[13] Fix | Delete
* @brief Git signature creation
[14] Fix | Delete
* @defgroup git_signature Git signature creation
[15] Fix | Delete
* @ingroup Git
[16] Fix | Delete
* @{
[17] Fix | Delete
*/
[18] Fix | Delete
GIT_BEGIN_DECL
[19] Fix | Delete
[20] Fix | Delete
/**
[21] Fix | Delete
* Create a new action signature.
[22] Fix | Delete
*
[23] Fix | Delete
* Call `git_signature_free()` to free the data.
[24] Fix | Delete
*
[25] Fix | Delete
* Note: angle brackets ('<' and '>') characters are not allowed
[26] Fix | Delete
* to be used in either the `name` or the `email` parameter.
[27] Fix | Delete
*
[28] Fix | Delete
* @param out new signature, in case of error NULL
[29] Fix | Delete
* @param name name of the person
[30] Fix | Delete
* @param email email of the person
[31] Fix | Delete
* @param time time (in seconds from epoch) when the action happened
[32] Fix | Delete
* @param offset timezone offset (in minutes) for the time
[33] Fix | Delete
* @return 0 or an error code
[34] Fix | Delete
*/
[35] Fix | Delete
GIT_EXTERN(int) git_signature_new(git_signature **out, const char *name, const char *email, git_time_t time, int offset);
[36] Fix | Delete
[37] Fix | Delete
/**
[38] Fix | Delete
* Create a new action signature with a timestamp of 'now'.
[39] Fix | Delete
*
[40] Fix | Delete
* Call `git_signature_free()` to free the data.
[41] Fix | Delete
*
[42] Fix | Delete
* @param out new signature, in case of error NULL
[43] Fix | Delete
* @param name name of the person
[44] Fix | Delete
* @param email email of the person
[45] Fix | Delete
* @return 0 or an error code
[46] Fix | Delete
*/
[47] Fix | Delete
GIT_EXTERN(int) git_signature_now(git_signature **out, const char *name, const char *email);
[48] Fix | Delete
[49] Fix | Delete
/**
[50] Fix | Delete
* Create a new action signature with default user and now timestamp.
[51] Fix | Delete
*
[52] Fix | Delete
* This looks up the user.name and user.email from the configuration and
[53] Fix | Delete
* uses the current time as the timestamp, and creates a new signature
[54] Fix | Delete
* based on that information. It will return GIT_ENOTFOUND if either the
[55] Fix | Delete
* user.name or user.email are not set.
[56] Fix | Delete
*
[57] Fix | Delete
* @param out new signature
[58] Fix | Delete
* @param repo repository pointer
[59] Fix | Delete
* @return 0 on success, GIT_ENOTFOUND if config is missing, or error code
[60] Fix | Delete
*/
[61] Fix | Delete
GIT_EXTERN(int) git_signature_default(git_signature **out, git_repository *repo);
[62] Fix | Delete
[63] Fix | Delete
/**
[64] Fix | Delete
* Create a new signature by parsing the given buffer, which is
[65] Fix | Delete
* expected to be in the format "Real Name <email> timestamp tzoffset",
[66] Fix | Delete
* where `timestamp` is the number of seconds since the Unix epoch and
[67] Fix | Delete
* `tzoffset` is the timezone offset in `hhmm` format (note the lack
[68] Fix | Delete
* of a colon separator).
[69] Fix | Delete
*
[70] Fix | Delete
* @param out new signature
[71] Fix | Delete
* @param buf signature string
[72] Fix | Delete
* @return 0 on success, or an error code
[73] Fix | Delete
*/
[74] Fix | Delete
GIT_EXTERN(int) git_signature_from_buffer(git_signature **out, const char *buf);
[75] Fix | Delete
[76] Fix | Delete
/**
[77] Fix | Delete
* Create a copy of an existing signature. All internal strings are also
[78] Fix | Delete
* duplicated.
[79] Fix | Delete
*
[80] Fix | Delete
* Call `git_signature_free()` to free the data.
[81] Fix | Delete
*
[82] Fix | Delete
* @param dest pointer where to store the copy
[83] Fix | Delete
* @param sig signature to duplicate
[84] Fix | Delete
* @return 0 or an error code
[85] Fix | Delete
*/
[86] Fix | Delete
GIT_EXTERN(int) git_signature_dup(git_signature **dest, const git_signature *sig);
[87] Fix | Delete
[88] Fix | Delete
/**
[89] Fix | Delete
* Free an existing signature.
[90] Fix | Delete
*
[91] Fix | Delete
* Because the signature is not an opaque structure, it is legal to free it
[92] Fix | Delete
* manually, but be sure to free the "name" and "email" strings in addition
[93] Fix | Delete
* to the structure itself.
[94] Fix | Delete
*
[95] Fix | Delete
* @param sig signature to free
[96] Fix | Delete
*/
[97] Fix | Delete
GIT_EXTERN(void) git_signature_free(git_signature *sig);
[98] Fix | Delete
[99] Fix | Delete
/** @} */
[100] Fix | Delete
GIT_END_DECL
[101] Fix | Delete
#endif
[102] Fix | Delete
[103] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function