Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/anonr.TX.../opt/imh-pyth.../include/git2
File: checkout.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_checkout_h__
[6] Fix | Delete
#define INCLUDE_git_checkout_h__
[7] Fix | Delete
[8] Fix | Delete
#include "common.h"
[9] Fix | Delete
#include "types.h"
[10] Fix | Delete
#include "diff.h"
[11] Fix | Delete
[12] Fix | Delete
/**
[13] Fix | Delete
* @file git2/checkout.h
[14] Fix | Delete
* @brief Git checkout routines
[15] Fix | Delete
* @defgroup git_checkout Git checkout 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
* Checkout behavior flags
[23] Fix | Delete
*
[24] Fix | Delete
* In libgit2, checkout is used to update the working directory and index
[25] Fix | Delete
* to match a target tree. Unlike git checkout, it does not move the HEAD
[26] Fix | Delete
* commit for you - use `git_repository_set_head` or the like to do that.
[27] Fix | Delete
*
[28] Fix | Delete
* Checkout looks at (up to) four things: the "target" tree you want to
[29] Fix | Delete
* check out, the "baseline" tree of what was checked out previously, the
[30] Fix | Delete
* working directory for actual files, and the index for staged changes.
[31] Fix | Delete
*
[32] Fix | Delete
* You give checkout one of three strategies for update:
[33] Fix | Delete
*
[34] Fix | Delete
* - `GIT_CHECKOUT_NONE` is a dry-run strategy that checks for conflicts,
[35] Fix | Delete
* etc., but doesn't make any actual changes.
[36] Fix | Delete
*
[37] Fix | Delete
* - `GIT_CHECKOUT_FORCE` is at the opposite extreme, taking any action to
[38] Fix | Delete
* make the working directory match the target (including potentially
[39] Fix | Delete
* discarding modified files).
[40] Fix | Delete
*
[41] Fix | Delete
* - `GIT_CHECKOUT_SAFE` is between these two options, it will only make
[42] Fix | Delete
* modifications that will not lose changes.
[43] Fix | Delete
*
[44] Fix | Delete
* | target == baseline | target != baseline |
[45] Fix | Delete
* ---------------------|-----------------------|----------------------|
[46] Fix | Delete
* workdir == baseline | no action | create, update, or |
[47] Fix | Delete
* | | delete file |
[48] Fix | Delete
* ---------------------|-----------------------|----------------------|
[49] Fix | Delete
* workdir exists and | no action | conflict (notify |
[50] Fix | Delete
* is != baseline | notify dirty MODIFIED | and cancel checkout) |
[51] Fix | Delete
* ---------------------|-----------------------|----------------------|
[52] Fix | Delete
* workdir missing, | notify dirty DELETED | create file |
[53] Fix | Delete
* baseline present | | |
[54] Fix | Delete
* ---------------------|-----------------------|----------------------|
[55] Fix | Delete
*
[56] Fix | Delete
* To emulate `git checkout`, use `GIT_CHECKOUT_SAFE` with a checkout
[57] Fix | Delete
* notification callback (see below) that displays information about dirty
[58] Fix | Delete
* files. The default behavior will cancel checkout on conflicts.
[59] Fix | Delete
*
[60] Fix | Delete
* To emulate `git checkout-index`, use `GIT_CHECKOUT_SAFE` with a
[61] Fix | Delete
* notification callback that cancels the operation if a dirty-but-existing
[62] Fix | Delete
* file is found in the working directory. This core git command isn't
[63] Fix | Delete
* quite "force" but is sensitive about some types of changes.
[64] Fix | Delete
*
[65] Fix | Delete
* To emulate `git checkout -f`, use `GIT_CHECKOUT_FORCE`.
[66] Fix | Delete
*
[67] Fix | Delete
*
[68] Fix | Delete
* There are some additional flags to modify the behavior of checkout:
[69] Fix | Delete
*
[70] Fix | Delete
* - GIT_CHECKOUT_ALLOW_CONFLICTS makes SAFE mode apply safe file updates
[71] Fix | Delete
* even if there are conflicts (instead of cancelling the checkout).
[72] Fix | Delete
*
[73] Fix | Delete
* - GIT_CHECKOUT_REMOVE_UNTRACKED means remove untracked files (i.e. not
[74] Fix | Delete
* in target, baseline, or index, and not ignored) from the working dir.
[75] Fix | Delete
*
[76] Fix | Delete
* - GIT_CHECKOUT_REMOVE_IGNORED means remove ignored files (that are also
[77] Fix | Delete
* untracked) from the working directory as well.
[78] Fix | Delete
*
[79] Fix | Delete
* - GIT_CHECKOUT_UPDATE_ONLY means to only update the content of files that
[80] Fix | Delete
* already exist. Files will not be created nor deleted. This just skips
[81] Fix | Delete
* applying adds, deletes, and typechanges.
[82] Fix | Delete
*
[83] Fix | Delete
* - GIT_CHECKOUT_DONT_UPDATE_INDEX prevents checkout from writing the
[84] Fix | Delete
* updated files' information to the index.
[85] Fix | Delete
*
[86] Fix | Delete
* - Normally, checkout will reload the index and git attributes from disk
[87] Fix | Delete
* before any operations. GIT_CHECKOUT_NO_REFRESH prevents this reload.
[88] Fix | Delete
*
[89] Fix | Delete
* - Unmerged index entries are conflicts. GIT_CHECKOUT_SKIP_UNMERGED skips
[90] Fix | Delete
* files with unmerged index entries instead. GIT_CHECKOUT_USE_OURS and
[91] Fix | Delete
* GIT_CHECKOUT_USE_THEIRS to proceed with the checkout using either the
[92] Fix | Delete
* stage 2 ("ours") or stage 3 ("theirs") version of files in the index.
[93] Fix | Delete
*
[94] Fix | Delete
* - GIT_CHECKOUT_DONT_OVERWRITE_IGNORED prevents ignored files from being
[95] Fix | Delete
* overwritten. Normally, files that are ignored in the working directory
[96] Fix | Delete
* are not considered "precious" and may be overwritten if the checkout
[97] Fix | Delete
* target contains that file.
[98] Fix | Delete
*
[99] Fix | Delete
* - GIT_CHECKOUT_DONT_REMOVE_EXISTING prevents checkout from removing
[100] Fix | Delete
* files or folders that fold to the same name on case insensitive
[101] Fix | Delete
* filesystems. This can cause files to retain their existing names
[102] Fix | Delete
* and write through existing symbolic links.
[103] Fix | Delete
*/
[104] Fix | Delete
typedef enum {
[105] Fix | Delete
GIT_CHECKOUT_NONE = 0, /**< default is a dry run, no actual updates */
[106] Fix | Delete
[107] Fix | Delete
/**
[108] Fix | Delete
* Allow safe updates that cannot overwrite uncommitted data.
[109] Fix | Delete
* If the uncommitted changes don't conflict with the checked out files,
[110] Fix | Delete
* the checkout will still proceed, leaving the changes intact.
[111] Fix | Delete
*
[112] Fix | Delete
* Mutually exclusive with GIT_CHECKOUT_FORCE.
[113] Fix | Delete
* GIT_CHECKOUT_FORCE takes precedence over GIT_CHECKOUT_SAFE.
[114] Fix | Delete
*/
[115] Fix | Delete
GIT_CHECKOUT_SAFE = (1u << 0),
[116] Fix | Delete
[117] Fix | Delete
/**
[118] Fix | Delete
* Allow all updates to force working directory to look like index.
[119] Fix | Delete
*
[120] Fix | Delete
* Mutually exclusive with GIT_CHECKOUT_SAFE.
[121] Fix | Delete
* GIT_CHECKOUT_FORCE takes precedence over GIT_CHECKOUT_SAFE.
[122] Fix | Delete
*/
[123] Fix | Delete
GIT_CHECKOUT_FORCE = (1u << 1),
[124] Fix | Delete
[125] Fix | Delete
[126] Fix | Delete
/** Allow checkout to recreate missing files */
[127] Fix | Delete
GIT_CHECKOUT_RECREATE_MISSING = (1u << 2),
[128] Fix | Delete
[129] Fix | Delete
/** Allow checkout to make safe updates even if conflicts are found */
[130] Fix | Delete
GIT_CHECKOUT_ALLOW_CONFLICTS = (1u << 4),
[131] Fix | Delete
[132] Fix | Delete
/** Remove untracked files not in index (that are not ignored) */
[133] Fix | Delete
GIT_CHECKOUT_REMOVE_UNTRACKED = (1u << 5),
[134] Fix | Delete
[135] Fix | Delete
/** Remove ignored files not in index */
[136] Fix | Delete
GIT_CHECKOUT_REMOVE_IGNORED = (1u << 6),
[137] Fix | Delete
[138] Fix | Delete
/** Only update existing files, don't create new ones */
[139] Fix | Delete
GIT_CHECKOUT_UPDATE_ONLY = (1u << 7),
[140] Fix | Delete
[141] Fix | Delete
/**
[142] Fix | Delete
* Normally checkout updates index entries as it goes; this stops that.
[143] Fix | Delete
* Implies `GIT_CHECKOUT_DONT_WRITE_INDEX`.
[144] Fix | Delete
*/
[145] Fix | Delete
GIT_CHECKOUT_DONT_UPDATE_INDEX = (1u << 8),
[146] Fix | Delete
[147] Fix | Delete
/** Don't refresh index/config/etc before doing checkout */
[148] Fix | Delete
GIT_CHECKOUT_NO_REFRESH = (1u << 9),
[149] Fix | Delete
[150] Fix | Delete
/** Allow checkout to skip unmerged files */
[151] Fix | Delete
GIT_CHECKOUT_SKIP_UNMERGED = (1u << 10),
[152] Fix | Delete
/** For unmerged files, checkout stage 2 from index */
[153] Fix | Delete
GIT_CHECKOUT_USE_OURS = (1u << 11),
[154] Fix | Delete
/** For unmerged files, checkout stage 3 from index */
[155] Fix | Delete
GIT_CHECKOUT_USE_THEIRS = (1u << 12),
[156] Fix | Delete
[157] Fix | Delete
/** Treat pathspec as simple list of exact match file paths */
[158] Fix | Delete
GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH = (1u << 13),
[159] Fix | Delete
[160] Fix | Delete
/** Ignore directories in use, they will be left empty */
[161] Fix | Delete
GIT_CHECKOUT_SKIP_LOCKED_DIRECTORIES = (1u << 18),
[162] Fix | Delete
[163] Fix | Delete
/** Don't overwrite ignored files that exist in the checkout target */
[164] Fix | Delete
GIT_CHECKOUT_DONT_OVERWRITE_IGNORED = (1u << 19),
[165] Fix | Delete
[166] Fix | Delete
/** Write normal merge files for conflicts */
[167] Fix | Delete
GIT_CHECKOUT_CONFLICT_STYLE_MERGE = (1u << 20),
[168] Fix | Delete
[169] Fix | Delete
/** Include common ancestor data in diff3 format files for conflicts */
[170] Fix | Delete
GIT_CHECKOUT_CONFLICT_STYLE_DIFF3 = (1u << 21),
[171] Fix | Delete
[172] Fix | Delete
/** Don't overwrite existing files or folders */
[173] Fix | Delete
GIT_CHECKOUT_DONT_REMOVE_EXISTING = (1u << 22),
[174] Fix | Delete
[175] Fix | Delete
/** Normally checkout writes the index upon completion; this prevents that. */
[176] Fix | Delete
GIT_CHECKOUT_DONT_WRITE_INDEX = (1u << 23),
[177] Fix | Delete
[178] Fix | Delete
/**
[179] Fix | Delete
* THE FOLLOWING OPTIONS ARE NOT YET IMPLEMENTED
[180] Fix | Delete
*/
[181] Fix | Delete
[182] Fix | Delete
/** Recursively checkout submodules with same options (NOT IMPLEMENTED) */
[183] Fix | Delete
GIT_CHECKOUT_UPDATE_SUBMODULES = (1u << 16),
[184] Fix | Delete
/** Recursively checkout submodules if HEAD moved in super repo (NOT IMPLEMENTED) */
[185] Fix | Delete
GIT_CHECKOUT_UPDATE_SUBMODULES_IF_CHANGED = (1u << 17),
[186] Fix | Delete
[187] Fix | Delete
} git_checkout_strategy_t;
[188] Fix | Delete
[189] Fix | Delete
/**
[190] Fix | Delete
* Checkout notification flags
[191] Fix | Delete
*
[192] Fix | Delete
* Checkout will invoke an options notification callback (`notify_cb`) for
[193] Fix | Delete
* certain cases - you pick which ones via `notify_flags`:
[194] Fix | Delete
*
[195] Fix | Delete
* - GIT_CHECKOUT_NOTIFY_CONFLICT invokes checkout on conflicting paths.
[196] Fix | Delete
*
[197] Fix | Delete
* - GIT_CHECKOUT_NOTIFY_DIRTY notifies about "dirty" files, i.e. those that
[198] Fix | Delete
* do not need an update but no longer match the baseline. Core git
[199] Fix | Delete
* displays these files when checkout runs, but won't stop the checkout.
[200] Fix | Delete
*
[201] Fix | Delete
* - GIT_CHECKOUT_NOTIFY_UPDATED sends notification for any file changed.
[202] Fix | Delete
*
[203] Fix | Delete
* - GIT_CHECKOUT_NOTIFY_UNTRACKED notifies about untracked files.
[204] Fix | Delete
*
[205] Fix | Delete
* - GIT_CHECKOUT_NOTIFY_IGNORED notifies about ignored files.
[206] Fix | Delete
*
[207] Fix | Delete
* Returning a non-zero value from this callback will cancel the checkout.
[208] Fix | Delete
* The non-zero return value will be propagated back and returned by the
[209] Fix | Delete
* git_checkout_... call.
[210] Fix | Delete
*
[211] Fix | Delete
* Notification callbacks are made prior to modifying any files on disk,
[212] Fix | Delete
* so canceling on any notification will still happen prior to any files
[213] Fix | Delete
* being modified.
[214] Fix | Delete
*/
[215] Fix | Delete
typedef enum {
[216] Fix | Delete
GIT_CHECKOUT_NOTIFY_NONE = 0,
[217] Fix | Delete
GIT_CHECKOUT_NOTIFY_CONFLICT = (1u << 0),
[218] Fix | Delete
GIT_CHECKOUT_NOTIFY_DIRTY = (1u << 1),
[219] Fix | Delete
GIT_CHECKOUT_NOTIFY_UPDATED = (1u << 2),
[220] Fix | Delete
GIT_CHECKOUT_NOTIFY_UNTRACKED = (1u << 3),
[221] Fix | Delete
GIT_CHECKOUT_NOTIFY_IGNORED = (1u << 4),
[222] Fix | Delete
[223] Fix | Delete
GIT_CHECKOUT_NOTIFY_ALL = 0x0FFFFu
[224] Fix | Delete
} git_checkout_notify_t;
[225] Fix | Delete
[226] Fix | Delete
/** Checkout performance-reporting structure */
[227] Fix | Delete
typedef struct {
[228] Fix | Delete
size_t mkdir_calls;
[229] Fix | Delete
size_t stat_calls;
[230] Fix | Delete
size_t chmod_calls;
[231] Fix | Delete
} git_checkout_perfdata;
[232] Fix | Delete
[233] Fix | Delete
/** Checkout notification callback function */
[234] Fix | Delete
typedef int GIT_CALLBACK(git_checkout_notify_cb)(
[235] Fix | Delete
git_checkout_notify_t why,
[236] Fix | Delete
const char *path,
[237] Fix | Delete
const git_diff_file *baseline,
[238] Fix | Delete
const git_diff_file *target,
[239] Fix | Delete
const git_diff_file *workdir,
[240] Fix | Delete
void *payload);
[241] Fix | Delete
[242] Fix | Delete
/** Checkout progress notification function */
[243] Fix | Delete
typedef void GIT_CALLBACK(git_checkout_progress_cb)(
[244] Fix | Delete
const char *path,
[245] Fix | Delete
size_t completed_steps,
[246] Fix | Delete
size_t total_steps,
[247] Fix | Delete
void *payload);
[248] Fix | Delete
[249] Fix | Delete
/** Checkout perfdata notification function */
[250] Fix | Delete
typedef void GIT_CALLBACK(git_checkout_perfdata_cb)(
[251] Fix | Delete
const git_checkout_perfdata *perfdata,
[252] Fix | Delete
void *payload);
[253] Fix | Delete
[254] Fix | Delete
/**
[255] Fix | Delete
* Checkout options structure
[256] Fix | Delete
*
[257] Fix | Delete
* Initialize with `GIT_CHECKOUT_OPTIONS_INIT`. Alternatively, you can
[258] Fix | Delete
* use `git_checkout_options_init`.
[259] Fix | Delete
*
[260] Fix | Delete
*/
[261] Fix | Delete
typedef struct git_checkout_options {
[262] Fix | Delete
unsigned int version; /**< The version */
[263] Fix | Delete
[264] Fix | Delete
unsigned int checkout_strategy; /**< default will be a safe checkout */
[265] Fix | Delete
[266] Fix | Delete
int disable_filters; /**< don't apply filters like CRLF conversion */
[267] Fix | Delete
unsigned int dir_mode; /**< default is 0755 */
[268] Fix | Delete
unsigned int file_mode; /**< default is 0644 or 0755 as dictated by blob */
[269] Fix | Delete
int file_open_flags; /**< default is O_CREAT | O_TRUNC | O_WRONLY */
[270] Fix | Delete
[271] Fix | Delete
unsigned int notify_flags; /**< see `git_checkout_notify_t` above */
[272] Fix | Delete
[273] Fix | Delete
/**
[274] Fix | Delete
* Optional callback to get notifications on specific file states.
[275] Fix | Delete
* @see git_checkout_notify_t
[276] Fix | Delete
*/
[277] Fix | Delete
git_checkout_notify_cb notify_cb;
[278] Fix | Delete
[279] Fix | Delete
/** Payload passed to notify_cb */
[280] Fix | Delete
void *notify_payload;
[281] Fix | Delete
[282] Fix | Delete
/** Optional callback to notify the consumer of checkout progress. */
[283] Fix | Delete
git_checkout_progress_cb progress_cb;
[284] Fix | Delete
[285] Fix | Delete
/** Payload passed to progress_cb */
[286] Fix | Delete
void *progress_payload;
[287] Fix | Delete
[288] Fix | Delete
/**
[289] Fix | Delete
* A list of wildmatch patterns or paths.
[290] Fix | Delete
*
[291] Fix | Delete
* By default, all paths are processed. If you pass an array of wildmatch
[292] Fix | Delete
* patterns, those will be used to filter which paths should be taken into
[293] Fix | Delete
* account.
[294] Fix | Delete
*
[295] Fix | Delete
* Use GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH to treat as a simple list.
[296] Fix | Delete
*/
[297] Fix | Delete
git_strarray paths;
[298] Fix | Delete
[299] Fix | Delete
/**
[300] Fix | Delete
* The expected content of the working directory; defaults to HEAD.
[301] Fix | Delete
*
[302] Fix | Delete
* If the working directory does not match this baseline information,
[303] Fix | Delete
* that will produce a checkout conflict.
[304] Fix | Delete
*/
[305] Fix | Delete
git_tree *baseline;
[306] Fix | Delete
[307] Fix | Delete
/**
[308] Fix | Delete
* Like `baseline` above, though expressed as an index. This
[309] Fix | Delete
* option overrides `baseline`.
[310] Fix | Delete
*/
[311] Fix | Delete
git_index *baseline_index;
[312] Fix | Delete
[313] Fix | Delete
const char *target_directory; /**< alternative checkout path to workdir */
[314] Fix | Delete
[315] Fix | Delete
const char *ancestor_label; /**< the name of the common ancestor side of conflicts */
[316] Fix | Delete
const char *our_label; /**< the name of the "our" side of conflicts */
[317] Fix | Delete
const char *their_label; /**< the name of the "their" side of conflicts */
[318] Fix | Delete
[319] Fix | Delete
/** Optional callback to notify the consumer of performance data. */
[320] Fix | Delete
git_checkout_perfdata_cb perfdata_cb;
[321] Fix | Delete
[322] Fix | Delete
/** Payload passed to perfdata_cb */
[323] Fix | Delete
void *perfdata_payload;
[324] Fix | Delete
} git_checkout_options;
[325] Fix | Delete
[326] Fix | Delete
#define GIT_CHECKOUT_OPTIONS_VERSION 1
[327] Fix | Delete
#define GIT_CHECKOUT_OPTIONS_INIT {GIT_CHECKOUT_OPTIONS_VERSION, GIT_CHECKOUT_SAFE}
[328] Fix | Delete
[329] Fix | Delete
/**
[330] Fix | Delete
* Initialize git_checkout_options structure
[331] Fix | Delete
*
[332] Fix | Delete
* Initializes a `git_checkout_options` with default values. Equivalent to creating
[333] Fix | Delete
* an instance with GIT_CHECKOUT_OPTIONS_INIT.
[334] Fix | Delete
*
[335] Fix | Delete
* @param opts The `git_checkout_options` struct to initialize.
[336] Fix | Delete
* @param version The struct version; pass `GIT_CHECKOUT_OPTIONS_VERSION`.
[337] Fix | Delete
* @return Zero on success; -1 on failure.
[338] Fix | Delete
*/
[339] Fix | Delete
GIT_EXTERN(int) git_checkout_options_init(
[340] Fix | Delete
git_checkout_options *opts,
[341] Fix | Delete
unsigned int version);
[342] Fix | Delete
[343] Fix | Delete
/**
[344] Fix | Delete
* Updates files in the index and the working tree to match the content of
[345] Fix | Delete
* the commit pointed at by HEAD.
[346] Fix | Delete
*
[347] Fix | Delete
* Note that this is _not_ the correct mechanism used to switch branches;
[348] Fix | Delete
* do not change your `HEAD` and then call this method, that would leave
[349] Fix | Delete
* you with checkout conflicts since your working directory would then
[350] Fix | Delete
* appear to be dirty. Instead, checkout the target of the branch and
[351] Fix | Delete
* then update `HEAD` using `git_repository_set_head` to point to the
[352] Fix | Delete
* branch you checked out.
[353] Fix | Delete
*
[354] Fix | Delete
* @param repo repository to check out (must be non-bare)
[355] Fix | Delete
* @param opts specifies checkout options (may be NULL)
[356] Fix | Delete
* @return 0 on success, GIT_EUNBORNBRANCH if HEAD points to a non
[357] Fix | Delete
* existing branch, non-zero value returned by `notify_cb`, or
[358] Fix | Delete
* other error code < 0 (use git_error_last for error details)
[359] Fix | Delete
*/
[360] Fix | Delete
GIT_EXTERN(int) git_checkout_head(
[361] Fix | Delete
git_repository *repo,
[362] Fix | Delete
const git_checkout_options *opts);
[363] Fix | Delete
[364] Fix | Delete
/**
[365] Fix | Delete
* Updates files in the working tree to match the content of the index.
[366] Fix | Delete
*
[367] Fix | Delete
* @param repo repository into which to check out (must be non-bare)
[368] Fix | Delete
* @param index index to be checked out (or NULL to use repository index)
[369] Fix | Delete
* @param opts specifies checkout options (may be NULL)
[370] Fix | Delete
* @return 0 on success, non-zero return value from `notify_cb`, or error
[371] Fix | Delete
* code < 0 (use git_error_last for error details)
[372] Fix | Delete
*/
[373] Fix | Delete
GIT_EXTERN(int) git_checkout_index(
[374] Fix | Delete
git_repository *repo,
[375] Fix | Delete
git_index *index,
[376] Fix | Delete
const git_checkout_options *opts);
[377] Fix | Delete
[378] Fix | Delete
/**
[379] Fix | Delete
* Updates files in the index and working tree to match the content of the
[380] Fix | Delete
* tree pointed at by the treeish.
[381] Fix | Delete
*
[382] Fix | Delete
* @param repo repository to check out (must be non-bare)
[383] Fix | Delete
* @param treeish a commit, tag or tree which content will be used to update
[384] Fix | Delete
* the working directory (or NULL to use HEAD)
[385] Fix | Delete
* @param opts specifies checkout options (may be NULL)
[386] Fix | Delete
* @return 0 on success, non-zero return value from `notify_cb`, or error
[387] Fix | Delete
* code < 0 (use git_error_last for error details)
[388] Fix | Delete
*/
[389] Fix | Delete
GIT_EXTERN(int) git_checkout_tree(
[390] Fix | Delete
git_repository *repo,
[391] Fix | Delete
const git_object *treeish,
[392] Fix | Delete
const git_checkout_options *opts);
[393] Fix | Delete
[394] Fix | Delete
/** @} */
[395] Fix | Delete
GIT_END_DECL
[396] Fix | Delete
#endif
[397] Fix | Delete
[398] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function