Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/anonr.TX.../opt/imh-pyth.../include/git2
File: revert.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_revert_h__
[6] Fix | Delete
#define INCLUDE_git_revert_h__
[7] Fix | Delete
[8] Fix | Delete
#include "common.h"
[9] Fix | Delete
#include "types.h"
[10] Fix | Delete
#include "merge.h"
[11] Fix | Delete
[12] Fix | Delete
/**
[13] Fix | Delete
* @file git2/revert.h
[14] Fix | Delete
* @brief Git revert routines
[15] Fix | Delete
* @defgroup git_revert Git revert 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
* Options for revert
[23] Fix | Delete
*/
[24] Fix | Delete
typedef struct {
[25] Fix | Delete
unsigned int version;
[26] Fix | Delete
[27] Fix | Delete
/** For merge commits, the "mainline" is treated as the parent. */
[28] Fix | Delete
unsigned int mainline;
[29] Fix | Delete
[30] Fix | Delete
git_merge_options merge_opts; /**< Options for the merging */
[31] Fix | Delete
git_checkout_options checkout_opts; /**< Options for the checkout */
[32] Fix | Delete
} git_revert_options;
[33] Fix | Delete
[34] Fix | Delete
#define GIT_REVERT_OPTIONS_VERSION 1
[35] Fix | Delete
#define GIT_REVERT_OPTIONS_INIT {GIT_REVERT_OPTIONS_VERSION, 0, GIT_MERGE_OPTIONS_INIT, GIT_CHECKOUT_OPTIONS_INIT}
[36] Fix | Delete
[37] Fix | Delete
/**
[38] Fix | Delete
* Initialize git_revert_options structure
[39] Fix | Delete
*
[40] Fix | Delete
* Initializes a `git_revert_options` with default values. Equivalent to
[41] Fix | Delete
* creating an instance with `GIT_REVERT_OPTIONS_INIT`.
[42] Fix | Delete
*
[43] Fix | Delete
* @param opts The `git_revert_options` struct to initialize.
[44] Fix | Delete
* @param version The struct version; pass `GIT_REVERT_OPTIONS_VERSION`.
[45] Fix | Delete
* @return Zero on success; -1 on failure.
[46] Fix | Delete
*/
[47] Fix | Delete
GIT_EXTERN(int) git_revert_options_init(
[48] Fix | Delete
git_revert_options *opts,
[49] Fix | Delete
unsigned int version);
[50] Fix | Delete
[51] Fix | Delete
/**
[52] Fix | Delete
* Reverts the given commit against the given "our" commit, producing an
[53] Fix | Delete
* index that reflects the result of the revert.
[54] Fix | Delete
*
[55] Fix | Delete
* The returned index must be freed explicitly with `git_index_free`.
[56] Fix | Delete
*
[57] Fix | Delete
* @param out pointer to store the index result in
[58] Fix | Delete
* @param repo the repository that contains the given commits
[59] Fix | Delete
* @param revert_commit the commit to revert
[60] Fix | Delete
* @param our_commit the commit to revert against (eg, HEAD)
[61] Fix | Delete
* @param mainline the parent of the revert commit, if it is a merge
[62] Fix | Delete
* @param merge_options the merge options (or null for defaults)
[63] Fix | Delete
* @return zero on success, -1 on failure.
[64] Fix | Delete
*/
[65] Fix | Delete
GIT_EXTERN(int) git_revert_commit(
[66] Fix | Delete
git_index **out,
[67] Fix | Delete
git_repository *repo,
[68] Fix | Delete
git_commit *revert_commit,
[69] Fix | Delete
git_commit *our_commit,
[70] Fix | Delete
unsigned int mainline,
[71] Fix | Delete
const git_merge_options *merge_options);
[72] Fix | Delete
[73] Fix | Delete
/**
[74] Fix | Delete
* Reverts the given commit, producing changes in the index and working directory.
[75] Fix | Delete
*
[76] Fix | Delete
* @param repo the repository to revert
[77] Fix | Delete
* @param commit the commit to revert
[78] Fix | Delete
* @param given_opts the revert options (or null for defaults)
[79] Fix | Delete
* @return zero on success, -1 on failure.
[80] Fix | Delete
*/
[81] Fix | Delete
GIT_EXTERN(int) git_revert(
[82] Fix | Delete
git_repository *repo,
[83] Fix | Delete
git_commit *commit,
[84] Fix | Delete
const git_revert_options *given_opts);
[85] Fix | Delete
[86] Fix | Delete
/** @} */
[87] Fix | Delete
GIT_END_DECL
[88] Fix | Delete
#endif
[89] Fix | Delete
[90] Fix | Delete
[91] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function