Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/smanonr..../opt/imh-pyth.../include/git2
File: cherrypick.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_cherrypick_h__
[6] Fix | Delete
#define INCLUDE_git_cherrypick_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/cherrypick.h
[14] Fix | Delete
* @brief Git cherry-pick routines
[15] Fix | Delete
* @defgroup git_cherrypick Git cherry-pick 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
* Cherry-pick options
[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_cherrypick_options;
[33] Fix | Delete
[34] Fix | Delete
#define GIT_CHERRYPICK_OPTIONS_VERSION 1
[35] Fix | Delete
#define GIT_CHERRYPICK_OPTIONS_INIT {GIT_CHERRYPICK_OPTIONS_VERSION, 0, GIT_MERGE_OPTIONS_INIT, GIT_CHECKOUT_OPTIONS_INIT}
[36] Fix | Delete
[37] Fix | Delete
/**
[38] Fix | Delete
* Initialize git_cherrypick_options structure
[39] Fix | Delete
*
[40] Fix | Delete
* Initializes a `git_cherrypick_options` with default values. Equivalent to creating
[41] Fix | Delete
* an instance with GIT_CHERRYPICK_OPTIONS_INIT.
[42] Fix | Delete
*
[43] Fix | Delete
* @param opts The `git_cherrypick_options` struct to initialize.
[44] Fix | Delete
* @param version The struct version; pass `GIT_CHERRYPICK_OPTIONS_VERSION`.
[45] Fix | Delete
* @return Zero on success; -1 on failure.
[46] Fix | Delete
*/
[47] Fix | Delete
GIT_EXTERN(int) git_cherrypick_options_init(
[48] Fix | Delete
git_cherrypick_options *opts,
[49] Fix | Delete
unsigned int version);
[50] Fix | Delete
[51] Fix | Delete
/**
[52] Fix | Delete
* Cherry-picks the given commit against the given "our" commit, producing an
[53] Fix | Delete
* index that reflects the result of the cherry-pick.
[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 cherrypick_commit the commit to cherry-pick
[60] Fix | Delete
* @param our_commit the commit to cherry-pick against (eg, HEAD)
[61] Fix | Delete
* @param mainline the parent of the `cherrypick_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_cherrypick_commit(
[66] Fix | Delete
git_index **out,
[67] Fix | Delete
git_repository *repo,
[68] Fix | Delete
git_commit *cherrypick_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
* Cherry-pick the given commit, producing changes in the index and working directory.
[75] Fix | Delete
*
[76] Fix | Delete
* @param repo the repository to cherry-pick
[77] Fix | Delete
* @param commit the commit to cherry-pick
[78] Fix | Delete
* @param cherrypick_options the cherry-pick 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_cherrypick(
[82] Fix | Delete
git_repository *repo,
[83] Fix | Delete
git_commit *commit,
[84] Fix | Delete
const git_cherrypick_options *cherrypick_options);
[85] Fix | Delete
[86] Fix | Delete
/** @} */
[87] Fix | Delete
GIT_END_DECL
[88] Fix | Delete
[89] Fix | Delete
#endif
[90] Fix | Delete
[91] Fix | Delete
[92] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function