Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/anonr.TX.../opt/imh-pyth.../include/git2
File: merge.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_merge_h__
[6] Fix | Delete
#define INCLUDE_git_merge_h__
[7] Fix | Delete
[8] Fix | Delete
#include "common.h"
[9] Fix | Delete
#include "types.h"
[10] Fix | Delete
#include "oid.h"
[11] Fix | Delete
#include "oidarray.h"
[12] Fix | Delete
#include "checkout.h"
[13] Fix | Delete
#include "index.h"
[14] Fix | Delete
#include "annotated_commit.h"
[15] Fix | Delete
[16] Fix | Delete
/**
[17] Fix | Delete
* @file git2/merge.h
[18] Fix | Delete
* @brief Git merge routines
[19] Fix | Delete
* @defgroup git_merge Git merge routines
[20] Fix | Delete
* @ingroup Git
[21] Fix | Delete
* @{
[22] Fix | Delete
*/
[23] Fix | Delete
GIT_BEGIN_DECL
[24] Fix | Delete
[25] Fix | Delete
/**
[26] Fix | Delete
* The file inputs to `git_merge_file`. Callers should populate the
[27] Fix | Delete
* `git_merge_file_input` structure with descriptions of the files in
[28] Fix | Delete
* each side of the conflict for use in producing the merge file.
[29] Fix | Delete
*/
[30] Fix | Delete
typedef struct {
[31] Fix | Delete
unsigned int version;
[32] Fix | Delete
[33] Fix | Delete
/** Pointer to the contents of the file. */
[34] Fix | Delete
const char *ptr;
[35] Fix | Delete
[36] Fix | Delete
/** Size of the contents pointed to in `ptr`. */
[37] Fix | Delete
size_t size;
[38] Fix | Delete
[39] Fix | Delete
/** File name of the conflicted file, or `NULL` to not merge the path. */
[40] Fix | Delete
const char *path;
[41] Fix | Delete
[42] Fix | Delete
/** File mode of the conflicted file, or `0` to not merge the mode. */
[43] Fix | Delete
unsigned int mode;
[44] Fix | Delete
} git_merge_file_input;
[45] Fix | Delete
[46] Fix | Delete
#define GIT_MERGE_FILE_INPUT_VERSION 1
[47] Fix | Delete
#define GIT_MERGE_FILE_INPUT_INIT {GIT_MERGE_FILE_INPUT_VERSION}
[48] Fix | Delete
[49] Fix | Delete
/**
[50] Fix | Delete
* Initializes a `git_merge_file_input` with default values. Equivalent to
[51] Fix | Delete
* creating an instance with GIT_MERGE_FILE_INPUT_INIT.
[52] Fix | Delete
*
[53] Fix | Delete
* @param opts the `git_merge_file_input` instance to initialize.
[54] Fix | Delete
* @param version the version of the struct; you should pass
[55] Fix | Delete
* `GIT_MERGE_FILE_INPUT_VERSION` here.
[56] Fix | Delete
* @return Zero on success; -1 on failure.
[57] Fix | Delete
*/
[58] Fix | Delete
GIT_EXTERN(int) git_merge_file_input_init(
[59] Fix | Delete
git_merge_file_input *opts,
[60] Fix | Delete
unsigned int version);
[61] Fix | Delete
[62] Fix | Delete
/**
[63] Fix | Delete
* Flags for `git_merge` options. A combination of these flags can be
[64] Fix | Delete
* passed in via the `flags` value in the `git_merge_options`.
[65] Fix | Delete
*/
[66] Fix | Delete
typedef enum {
[67] Fix | Delete
/**
[68] Fix | Delete
* Detect renames that occur between the common ancestor and the "ours"
[69] Fix | Delete
* side or the common ancestor and the "theirs" side. This will enable
[70] Fix | Delete
* the ability to merge between a modified and renamed file.
[71] Fix | Delete
*/
[72] Fix | Delete
GIT_MERGE_FIND_RENAMES = (1 << 0),
[73] Fix | Delete
[74] Fix | Delete
/**
[75] Fix | Delete
* If a conflict occurs, exit immediately instead of attempting to
[76] Fix | Delete
* continue resolving conflicts. The merge operation will fail with
[77] Fix | Delete
* GIT_EMERGECONFLICT and no index will be returned.
[78] Fix | Delete
*/
[79] Fix | Delete
GIT_MERGE_FAIL_ON_CONFLICT = (1 << 1),
[80] Fix | Delete
[81] Fix | Delete
/**
[82] Fix | Delete
* Do not write the REUC extension on the generated index
[83] Fix | Delete
*/
[84] Fix | Delete
GIT_MERGE_SKIP_REUC = (1 << 2),
[85] Fix | Delete
[86] Fix | Delete
/**
[87] Fix | Delete
* If the commits being merged have multiple merge bases, do not build
[88] Fix | Delete
* a recursive merge base (by merging the multiple merge bases),
[89] Fix | Delete
* instead simply use the first base. This flag provides a similar
[90] Fix | Delete
* merge base to `git-merge-resolve`.
[91] Fix | Delete
*/
[92] Fix | Delete
GIT_MERGE_NO_RECURSIVE = (1 << 3),
[93] Fix | Delete
} git_merge_flag_t;
[94] Fix | Delete
[95] Fix | Delete
/**
[96] Fix | Delete
* Merge file favor options for `git_merge_options` instruct the file-level
[97] Fix | Delete
* merging functionality how to deal with conflicting regions of the files.
[98] Fix | Delete
*/
[99] Fix | Delete
typedef enum {
[100] Fix | Delete
/**
[101] Fix | Delete
* When a region of a file is changed in both branches, a conflict
[102] Fix | Delete
* will be recorded in the index so that `git_checkout` can produce
[103] Fix | Delete
* a merge file with conflict markers in the working directory.
[104] Fix | Delete
* This is the default.
[105] Fix | Delete
*/
[106] Fix | Delete
GIT_MERGE_FILE_FAVOR_NORMAL = 0,
[107] Fix | Delete
[108] Fix | Delete
/**
[109] Fix | Delete
* When a region of a file is changed in both branches, the file
[110] Fix | Delete
* created in the index will contain the "ours" side of any conflicting
[111] Fix | Delete
* region. The index will not record a conflict.
[112] Fix | Delete
*/
[113] Fix | Delete
GIT_MERGE_FILE_FAVOR_OURS = 1,
[114] Fix | Delete
[115] Fix | Delete
/**
[116] Fix | Delete
* When a region of a file is changed in both branches, the file
[117] Fix | Delete
* created in the index will contain the "theirs" side of any conflicting
[118] Fix | Delete
* region. The index will not record a conflict.
[119] Fix | Delete
*/
[120] Fix | Delete
GIT_MERGE_FILE_FAVOR_THEIRS = 2,
[121] Fix | Delete
[122] Fix | Delete
/**
[123] Fix | Delete
* When a region of a file is changed in both branches, the file
[124] Fix | Delete
* created in the index will contain each unique line from each side,
[125] Fix | Delete
* which has the result of combining both files. The index will not
[126] Fix | Delete
* record a conflict.
[127] Fix | Delete
*/
[128] Fix | Delete
GIT_MERGE_FILE_FAVOR_UNION = 3,
[129] Fix | Delete
} git_merge_file_favor_t;
[130] Fix | Delete
[131] Fix | Delete
/**
[132] Fix | Delete
* File merging flags
[133] Fix | Delete
*/
[134] Fix | Delete
typedef enum {
[135] Fix | Delete
/** Defaults */
[136] Fix | Delete
GIT_MERGE_FILE_DEFAULT = 0,
[137] Fix | Delete
[138] Fix | Delete
/** Create standard conflicted merge files */
[139] Fix | Delete
GIT_MERGE_FILE_STYLE_MERGE = (1 << 0),
[140] Fix | Delete
[141] Fix | Delete
/** Create diff3-style files */
[142] Fix | Delete
GIT_MERGE_FILE_STYLE_DIFF3 = (1 << 1),
[143] Fix | Delete
[144] Fix | Delete
/** Condense non-alphanumeric regions for simplified diff file */
[145] Fix | Delete
GIT_MERGE_FILE_SIMPLIFY_ALNUM = (1 << 2),
[146] Fix | Delete
[147] Fix | Delete
/** Ignore all whitespace */
[148] Fix | Delete
GIT_MERGE_FILE_IGNORE_WHITESPACE = (1 << 3),
[149] Fix | Delete
[150] Fix | Delete
/** Ignore changes in amount of whitespace */
[151] Fix | Delete
GIT_MERGE_FILE_IGNORE_WHITESPACE_CHANGE = (1 << 4),
[152] Fix | Delete
[153] Fix | Delete
/** Ignore whitespace at end of line */
[154] Fix | Delete
GIT_MERGE_FILE_IGNORE_WHITESPACE_EOL = (1 << 5),
[155] Fix | Delete
[156] Fix | Delete
/** Use the "patience diff" algorithm */
[157] Fix | Delete
GIT_MERGE_FILE_DIFF_PATIENCE = (1 << 6),
[158] Fix | Delete
[159] Fix | Delete
/** Take extra time to find minimal diff */
[160] Fix | Delete
GIT_MERGE_FILE_DIFF_MINIMAL = (1 << 7),
[161] Fix | Delete
} git_merge_file_flag_t;
[162] Fix | Delete
[163] Fix | Delete
#define GIT_MERGE_CONFLICT_MARKER_SIZE 7
[164] Fix | Delete
[165] Fix | Delete
/**
[166] Fix | Delete
* Options for merging a file
[167] Fix | Delete
*/
[168] Fix | Delete
typedef struct {
[169] Fix | Delete
unsigned int version;
[170] Fix | Delete
[171] Fix | Delete
/**
[172] Fix | Delete
* Label for the ancestor file side of the conflict which will be prepended
[173] Fix | Delete
* to labels in diff3-format merge files.
[174] Fix | Delete
*/
[175] Fix | Delete
const char *ancestor_label;
[176] Fix | Delete
[177] Fix | Delete
/**
[178] Fix | Delete
* Label for our file side of the conflict which will be prepended
[179] Fix | Delete
* to labels in merge files.
[180] Fix | Delete
*/
[181] Fix | Delete
const char *our_label;
[182] Fix | Delete
[183] Fix | Delete
/**
[184] Fix | Delete
* Label for their file side of the conflict which will be prepended
[185] Fix | Delete
* to labels in merge files.
[186] Fix | Delete
*/
[187] Fix | Delete
const char *their_label;
[188] Fix | Delete
[189] Fix | Delete
/** The file to favor in region conflicts. */
[190] Fix | Delete
git_merge_file_favor_t favor;
[191] Fix | Delete
[192] Fix | Delete
/** see `git_merge_file_flag_t` above */
[193] Fix | Delete
uint32_t flags;
[194] Fix | Delete
[195] Fix | Delete
/** The size of conflict markers (eg, "<<<<<<<"). Default is
[196] Fix | Delete
* GIT_MERGE_CONFLICT_MARKER_SIZE. */
[197] Fix | Delete
unsigned short marker_size;
[198] Fix | Delete
} git_merge_file_options;
[199] Fix | Delete
[200] Fix | Delete
#define GIT_MERGE_FILE_OPTIONS_VERSION 1
[201] Fix | Delete
#define GIT_MERGE_FILE_OPTIONS_INIT {GIT_MERGE_FILE_OPTIONS_VERSION}
[202] Fix | Delete
[203] Fix | Delete
/**
[204] Fix | Delete
* Initialize git_merge_file_options structure
[205] Fix | Delete
*
[206] Fix | Delete
* Initializes a `git_merge_file_options` with default values. Equivalent to
[207] Fix | Delete
* creating an instance with `GIT_MERGE_FILE_OPTIONS_INIT`.
[208] Fix | Delete
*
[209] Fix | Delete
* @param opts The `git_merge_file_options` struct to initialize.
[210] Fix | Delete
* @param version The struct version; pass `GIT_MERGE_FILE_OPTIONS_VERSION`.
[211] Fix | Delete
* @return Zero on success; -1 on failure.
[212] Fix | Delete
*/
[213] Fix | Delete
GIT_EXTERN(int) git_merge_file_options_init(git_merge_file_options *opts, unsigned int version);
[214] Fix | Delete
[215] Fix | Delete
/**
[216] Fix | Delete
* Information about file-level merging
[217] Fix | Delete
*/
[218] Fix | Delete
typedef struct {
[219] Fix | Delete
/**
[220] Fix | Delete
* True if the output was automerged, false if the output contains
[221] Fix | Delete
* conflict markers.
[222] Fix | Delete
*/
[223] Fix | Delete
unsigned int automergeable;
[224] Fix | Delete
[225] Fix | Delete
/**
[226] Fix | Delete
* The path that the resultant merge file should use, or NULL if a
[227] Fix | Delete
* filename conflict would occur.
[228] Fix | Delete
*/
[229] Fix | Delete
const char *path;
[230] Fix | Delete
[231] Fix | Delete
/** The mode that the resultant merge file should use. */
[232] Fix | Delete
unsigned int mode;
[233] Fix | Delete
[234] Fix | Delete
/** The contents of the merge. */
[235] Fix | Delete
const char *ptr;
[236] Fix | Delete
[237] Fix | Delete
/** The length of the merge contents. */
[238] Fix | Delete
size_t len;
[239] Fix | Delete
} git_merge_file_result;
[240] Fix | Delete
[241] Fix | Delete
/**
[242] Fix | Delete
* Merging options
[243] Fix | Delete
*/
[244] Fix | Delete
typedef struct {
[245] Fix | Delete
unsigned int version;
[246] Fix | Delete
[247] Fix | Delete
/** See `git_merge_flag_t` above */
[248] Fix | Delete
uint32_t flags;
[249] Fix | Delete
[250] Fix | Delete
/**
[251] Fix | Delete
* Similarity to consider a file renamed (default 50). If
[252] Fix | Delete
* `GIT_MERGE_FIND_RENAMES` is enabled, added files will be compared
[253] Fix | Delete
* with deleted files to determine their similarity. Files that are
[254] Fix | Delete
* more similar than the rename threshold (percentage-wise) will be
[255] Fix | Delete
* treated as a rename.
[256] Fix | Delete
*/
[257] Fix | Delete
unsigned int rename_threshold;
[258] Fix | Delete
[259] Fix | Delete
/**
[260] Fix | Delete
* Maximum similarity sources to examine for renames (default 200).
[261] Fix | Delete
* If the number of rename candidates (add / delete pairs) is greater
[262] Fix | Delete
* than this value, inexact rename detection is aborted.
[263] Fix | Delete
*
[264] Fix | Delete
* This setting overrides the `merge.renameLimit` configuration value.
[265] Fix | Delete
*/
[266] Fix | Delete
unsigned int target_limit;
[267] Fix | Delete
[268] Fix | Delete
/** Pluggable similarity metric; pass NULL to use internal metric */
[269] Fix | Delete
git_diff_similarity_metric *metric;
[270] Fix | Delete
[271] Fix | Delete
/**
[272] Fix | Delete
* Maximum number of times to merge common ancestors to build a
[273] Fix | Delete
* virtual merge base when faced with criss-cross merges. When this
[274] Fix | Delete
* limit is reached, the next ancestor will simply be used instead of
[275] Fix | Delete
* attempting to merge it. The default is unlimited.
[276] Fix | Delete
*/
[277] Fix | Delete
unsigned int recursion_limit;
[278] Fix | Delete
[279] Fix | Delete
/**
[280] Fix | Delete
* Default merge driver to be used when both sides of a merge have
[281] Fix | Delete
* changed. The default is the `text` driver.
[282] Fix | Delete
*/
[283] Fix | Delete
const char *default_driver;
[284] Fix | Delete
[285] Fix | Delete
/**
[286] Fix | Delete
* Flags for handling conflicting content, to be used with the standard
[287] Fix | Delete
* (`text`) merge driver.
[288] Fix | Delete
*/
[289] Fix | Delete
git_merge_file_favor_t file_favor;
[290] Fix | Delete
[291] Fix | Delete
/** see `git_merge_file_flag_t` above */
[292] Fix | Delete
uint32_t file_flags;
[293] Fix | Delete
} git_merge_options;
[294] Fix | Delete
[295] Fix | Delete
#define GIT_MERGE_OPTIONS_VERSION 1
[296] Fix | Delete
#define GIT_MERGE_OPTIONS_INIT { \
[297] Fix | Delete
GIT_MERGE_OPTIONS_VERSION, GIT_MERGE_FIND_RENAMES }
[298] Fix | Delete
[299] Fix | Delete
/**
[300] Fix | Delete
* Initialize git_merge_options structure
[301] Fix | Delete
*
[302] Fix | Delete
* Initializes a `git_merge_options` with default values. Equivalent to
[303] Fix | Delete
* creating an instance with `GIT_MERGE_OPTIONS_INIT`.
[304] Fix | Delete
*
[305] Fix | Delete
* @param opts The `git_merge_options` struct to initialize.
[306] Fix | Delete
* @param version The struct version; pass `GIT_MERGE_OPTIONS_VERSION`.
[307] Fix | Delete
* @return Zero on success; -1 on failure.
[308] Fix | Delete
*/
[309] Fix | Delete
GIT_EXTERN(int) git_merge_options_init(git_merge_options *opts, unsigned int version);
[310] Fix | Delete
[311] Fix | Delete
/**
[312] Fix | Delete
* The results of `git_merge_analysis` indicate the merge opportunities.
[313] Fix | Delete
*/
[314] Fix | Delete
typedef enum {
[315] Fix | Delete
/** No merge is possible. (Unused.) */
[316] Fix | Delete
GIT_MERGE_ANALYSIS_NONE = 0,
[317] Fix | Delete
[318] Fix | Delete
/**
[319] Fix | Delete
* A "normal" merge; both HEAD and the given merge input have diverged
[320] Fix | Delete
* from their common ancestor. The divergent commits must be merged.
[321] Fix | Delete
*/
[322] Fix | Delete
GIT_MERGE_ANALYSIS_NORMAL = (1 << 0),
[323] Fix | Delete
[324] Fix | Delete
/**
[325] Fix | Delete
* All given merge inputs are reachable from HEAD, meaning the
[326] Fix | Delete
* repository is up-to-date and no merge needs to be performed.
[327] Fix | Delete
*/
[328] Fix | Delete
GIT_MERGE_ANALYSIS_UP_TO_DATE = (1 << 1),
[329] Fix | Delete
[330] Fix | Delete
/**
[331] Fix | Delete
* The given merge input is a fast-forward from HEAD and no merge
[332] Fix | Delete
* needs to be performed. Instead, the client can check out the
[333] Fix | Delete
* given merge input.
[334] Fix | Delete
*/
[335] Fix | Delete
GIT_MERGE_ANALYSIS_FASTFORWARD = (1 << 2),
[336] Fix | Delete
[337] Fix | Delete
/**
[338] Fix | Delete
* The HEAD of the current repository is "unborn" and does not point to
[339] Fix | Delete
* a valid commit. No merge can be performed, but the caller may wish
[340] Fix | Delete
* to simply set HEAD to the target commit(s).
[341] Fix | Delete
*/
[342] Fix | Delete
GIT_MERGE_ANALYSIS_UNBORN = (1 << 3),
[343] Fix | Delete
} git_merge_analysis_t;
[344] Fix | Delete
[345] Fix | Delete
/**
[346] Fix | Delete
* The user's stated preference for merges.
[347] Fix | Delete
*/
[348] Fix | Delete
typedef enum {
[349] Fix | Delete
/**
[350] Fix | Delete
* No configuration was found that suggests a preferred behavior for
[351] Fix | Delete
* merge.
[352] Fix | Delete
*/
[353] Fix | Delete
GIT_MERGE_PREFERENCE_NONE = 0,
[354] Fix | Delete
[355] Fix | Delete
/**
[356] Fix | Delete
* There is a `merge.ff=false` configuration setting, suggesting that
[357] Fix | Delete
* the user does not want to allow a fast-forward merge.
[358] Fix | Delete
*/
[359] Fix | Delete
GIT_MERGE_PREFERENCE_NO_FASTFORWARD = (1 << 0),
[360] Fix | Delete
[361] Fix | Delete
/**
[362] Fix | Delete
* There is a `merge.ff=only` configuration setting, suggesting that
[363] Fix | Delete
* the user only wants fast-forward merges.
[364] Fix | Delete
*/
[365] Fix | Delete
GIT_MERGE_PREFERENCE_FASTFORWARD_ONLY = (1 << 1),
[366] Fix | Delete
} git_merge_preference_t;
[367] Fix | Delete
[368] Fix | Delete
/**
[369] Fix | Delete
* Analyzes the given branch(es) and determines the opportunities for
[370] Fix | Delete
* merging them into the HEAD of the repository.
[371] Fix | Delete
*
[372] Fix | Delete
* @param analysis_out analysis enumeration that the result is written into
[373] Fix | Delete
* @param repo the repository to merge
[374] Fix | Delete
* @param their_heads the heads to merge into
[375] Fix | Delete
* @param their_heads_len the number of heads to merge
[376] Fix | Delete
* @return 0 on success or error code
[377] Fix | Delete
*/
[378] Fix | Delete
GIT_EXTERN(int) git_merge_analysis(
[379] Fix | Delete
git_merge_analysis_t *analysis_out,
[380] Fix | Delete
git_merge_preference_t *preference_out,
[381] Fix | Delete
git_repository *repo,
[382] Fix | Delete
const git_annotated_commit **their_heads,
[383] Fix | Delete
size_t their_heads_len);
[384] Fix | Delete
[385] Fix | Delete
/**
[386] Fix | Delete
* Analyzes the given branch(es) and determines the opportunities for
[387] Fix | Delete
* merging them into a reference.
[388] Fix | Delete
*
[389] Fix | Delete
* @param analysis_out analysis enumeration that the result is written into
[390] Fix | Delete
* @param repo the repository to merge
[391] Fix | Delete
* @param our_ref the reference to perform the analysis from
[392] Fix | Delete
* @param their_heads the heads to merge into
[393] Fix | Delete
* @param their_heads_len the number of heads to merge
[394] Fix | Delete
* @return 0 on success or error code
[395] Fix | Delete
*/
[396] Fix | Delete
GIT_EXTERN(int) git_merge_analysis_for_ref(
[397] Fix | Delete
git_merge_analysis_t *analysis_out,
[398] Fix | Delete
git_merge_preference_t *preference_out,
[399] Fix | Delete
git_repository *repo,
[400] Fix | Delete
git_reference *our_ref,
[401] Fix | Delete
const git_annotated_commit **their_heads,
[402] Fix | Delete
size_t their_heads_len);
[403] Fix | Delete
[404] Fix | Delete
/**
[405] Fix | Delete
* Find a merge base between two commits
[406] Fix | Delete
*
[407] Fix | Delete
* @param out the OID of a merge base between 'one' and 'two'
[408] Fix | Delete
* @param repo the repository where the commits exist
[409] Fix | Delete
* @param one one of the commits
[410] Fix | Delete
* @param two the other commit
[411] Fix | Delete
* @return 0 on success, GIT_ENOTFOUND if not found or error code
[412] Fix | Delete
*/
[413] Fix | Delete
GIT_EXTERN(int) git_merge_base(
[414] Fix | Delete
git_oid *out,
[415] Fix | Delete
git_repository *repo,
[416] Fix | Delete
const git_oid *one,
[417] Fix | Delete
const git_oid *two);
[418] Fix | Delete
[419] Fix | Delete
/**
[420] Fix | Delete
* Find merge bases between two commits
[421] Fix | Delete
*
[422] Fix | Delete
* @param out array in which to store the resulting ids
[423] Fix | Delete
* @param repo the repository where the commits exist
[424] Fix | Delete
* @param one one of the commits
[425] Fix | Delete
* @param two the other commit
[426] Fix | Delete
* @return 0 on success, GIT_ENOTFOUND if not found or error code
[427] Fix | Delete
*/
[428] Fix | Delete
GIT_EXTERN(int) git_merge_bases(
[429] Fix | Delete
git_oidarray *out,
[430] Fix | Delete
git_repository *repo,
[431] Fix | Delete
const git_oid *one,
[432] Fix | Delete
const git_oid *two);
[433] Fix | Delete
[434] Fix | Delete
/**
[435] Fix | Delete
* Find a merge base given a list of commits
[436] Fix | Delete
*
[437] Fix | Delete
* @param out the OID of a merge base considering all the commits
[438] Fix | Delete
* @param repo the repository where the commits exist
[439] Fix | Delete
* @param length The number of commits in the provided `input_array`
[440] Fix | Delete
* @param input_array oids of the commits
[441] Fix | Delete
* @return Zero on success; GIT_ENOTFOUND or -1 on failure.
[442] Fix | Delete
*/
[443] Fix | Delete
GIT_EXTERN(int) git_merge_base_many(
[444] Fix | Delete
git_oid *out,
[445] Fix | Delete
git_repository *repo,
[446] Fix | Delete
size_t length,
[447] Fix | Delete
const git_oid input_array[]);
[448] Fix | Delete
[449] Fix | Delete
/**
[450] Fix | Delete
* Find all merge bases given a list of commits
[451] Fix | Delete
*
[452] Fix | Delete
* @param out array in which to store the resulting ids
[453] Fix | Delete
* @param repo the repository where the commits exist
[454] Fix | Delete
* @param length The number of commits in the provided `input_array`
[455] Fix | Delete
* @param input_array oids of the commits
[456] Fix | Delete
* @return Zero on success; GIT_ENOTFOUND or -1 on failure.
[457] Fix | Delete
*/
[458] Fix | Delete
GIT_EXTERN(int) git_merge_bases_many(
[459] Fix | Delete
git_oidarray *out,
[460] Fix | Delete
git_repository *repo,
[461] Fix | Delete
size_t length,
[462] Fix | Delete
const git_oid input_array[]);
[463] Fix | Delete
[464] Fix | Delete
/**
[465] Fix | Delete
* Find a merge base in preparation for an octopus merge
[466] Fix | Delete
*
[467] Fix | Delete
* @param out the OID of a merge base considering all the commits
[468] Fix | Delete
* @param repo the repository where the commits exist
[469] Fix | Delete
* @param length The number of commits in the provided `input_array`
[470] Fix | Delete
* @param input_array oids of the commits
[471] Fix | Delete
* @return Zero on success; GIT_ENOTFOUND or -1 on failure.
[472] Fix | Delete
*/
[473] Fix | Delete
GIT_EXTERN(int) git_merge_base_octopus(
[474] Fix | Delete
git_oid *out,
[475] Fix | Delete
git_repository *repo,
[476] Fix | Delete
size_t length,
[477] Fix | Delete
const git_oid input_array[]);
[478] Fix | Delete
[479] Fix | Delete
/**
[480] Fix | Delete
* Merge two files as they exist in the in-memory data structures, using
[481] Fix | Delete
* the given common ancestor as the baseline, producing a
[482] Fix | Delete
* `git_merge_file_result` that reflects the merge result. The
[483] Fix | Delete
* `git_merge_file_result` must be freed with `git_merge_file_result_free`.
[484] Fix | Delete
*
[485] Fix | Delete
* Note that this function does not reference a repository and any
[486] Fix | Delete
* configuration must be passed as `git_merge_file_options`.
[487] Fix | Delete
*
[488] Fix | Delete
* @param out The git_merge_file_result to be filled in
[489] Fix | Delete
* @param ancestor The contents of the ancestor file
[490] Fix | Delete
* @param ours The contents of the file in "our" side
[491] Fix | Delete
* @param theirs The contents of the file in "their" side
[492] Fix | Delete
* @param opts The merge file options or `NULL` for defaults
[493] Fix | Delete
* @return 0 on success or error code
[494] Fix | Delete
*/
[495] Fix | Delete
GIT_EXTERN(int) git_merge_file(
[496] Fix | Delete
git_merge_file_result *out,
[497] Fix | Delete
const git_merge_file_input *ancestor,
[498] Fix | Delete
const git_merge_file_input *ours,
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function