Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/smanonr..../opt/imh-pyth.../include/git2
File: config.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_config_h__
[6] Fix | Delete
#define INCLUDE_git_config_h__
[7] Fix | Delete
[8] Fix | Delete
#include "common.h"
[9] Fix | Delete
#include "types.h"
[10] Fix | Delete
#include "buffer.h"
[11] Fix | Delete
[12] Fix | Delete
/**
[13] Fix | Delete
* @file git2/config.h
[14] Fix | Delete
* @brief Git config management routines
[15] Fix | Delete
* @defgroup git_config Git config management 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
* Priority level of a config file.
[23] Fix | Delete
* These priority levels correspond to the natural escalation logic
[24] Fix | Delete
* (from higher to lower) when searching for config entries in git.git.
[25] Fix | Delete
*
[26] Fix | Delete
* git_config_open_default() and git_repository_config() honor those
[27] Fix | Delete
* priority levels as well.
[28] Fix | Delete
*/
[29] Fix | Delete
typedef enum {
[30] Fix | Delete
/** System-wide on Windows, for compatibility with portable git */
[31] Fix | Delete
GIT_CONFIG_LEVEL_PROGRAMDATA = 1,
[32] Fix | Delete
[33] Fix | Delete
/** System-wide configuration file; /etc/gitconfig on Linux systems */
[34] Fix | Delete
GIT_CONFIG_LEVEL_SYSTEM = 2,
[35] Fix | Delete
[36] Fix | Delete
/** XDG compatible configuration file; typically ~/.config/git/config */
[37] Fix | Delete
GIT_CONFIG_LEVEL_XDG = 3,
[38] Fix | Delete
[39] Fix | Delete
/** User-specific configuration file (also called Global configuration
[40] Fix | Delete
* file); typically ~/.gitconfig
[41] Fix | Delete
*/
[42] Fix | Delete
GIT_CONFIG_LEVEL_GLOBAL = 4,
[43] Fix | Delete
[44] Fix | Delete
/** Repository specific configuration file; $WORK_DIR/.git/config on
[45] Fix | Delete
* non-bare repos
[46] Fix | Delete
*/
[47] Fix | Delete
GIT_CONFIG_LEVEL_LOCAL = 5,
[48] Fix | Delete
[49] Fix | Delete
/** Application specific configuration file; freely defined by applications
[50] Fix | Delete
*/
[51] Fix | Delete
GIT_CONFIG_LEVEL_APP = 6,
[52] Fix | Delete
[53] Fix | Delete
/** Represents the highest level available config file (i.e. the most
[54] Fix | Delete
* specific config file available that actually is loaded)
[55] Fix | Delete
*/
[56] Fix | Delete
GIT_CONFIG_HIGHEST_LEVEL = -1,
[57] Fix | Delete
} git_config_level_t;
[58] Fix | Delete
[59] Fix | Delete
/**
[60] Fix | Delete
* An entry in a configuration file
[61] Fix | Delete
*/
[62] Fix | Delete
typedef struct git_config_entry {
[63] Fix | Delete
const char *name; /**< Name of the entry (normalised) */
[64] Fix | Delete
const char *value; /**< String value of the entry */
[65] Fix | Delete
unsigned int include_depth; /**< Depth of includes where this variable was found */
[66] Fix | Delete
git_config_level_t level; /**< Which config file this was found in */
[67] Fix | Delete
void GIT_CALLBACK(free)(struct git_config_entry *entry); /**< Free function for this entry */
[68] Fix | Delete
void *payload; /**< Opaque value for the free function. Do not read or write */
[69] Fix | Delete
} git_config_entry;
[70] Fix | Delete
[71] Fix | Delete
/**
[72] Fix | Delete
* Free a config entry
[73] Fix | Delete
*/
[74] Fix | Delete
GIT_EXTERN(void) git_config_entry_free(git_config_entry *);
[75] Fix | Delete
[76] Fix | Delete
/**
[77] Fix | Delete
* A config enumeration callback
[78] Fix | Delete
*
[79] Fix | Delete
* @param entry the entry currently being enumerated
[80] Fix | Delete
* @param payload a user-specified pointer
[81] Fix | Delete
*/
[82] Fix | Delete
typedef int GIT_CALLBACK(git_config_foreach_cb)(const git_config_entry *entry, void *payload);
[83] Fix | Delete
[84] Fix | Delete
/**
[85] Fix | Delete
* An opaque structure for a configuration iterator
[86] Fix | Delete
*/
[87] Fix | Delete
typedef struct git_config_iterator git_config_iterator;
[88] Fix | Delete
[89] Fix | Delete
/**
[90] Fix | Delete
* Config var type
[91] Fix | Delete
*/
[92] Fix | Delete
typedef enum {
[93] Fix | Delete
GIT_CONFIGMAP_FALSE = 0,
[94] Fix | Delete
GIT_CONFIGMAP_TRUE = 1,
[95] Fix | Delete
GIT_CONFIGMAP_INT32,
[96] Fix | Delete
GIT_CONFIGMAP_STRING
[97] Fix | Delete
} git_configmap_t;
[98] Fix | Delete
[99] Fix | Delete
/**
[100] Fix | Delete
* Mapping from config variables to values.
[101] Fix | Delete
*/
[102] Fix | Delete
typedef struct {
[103] Fix | Delete
git_configmap_t type;
[104] Fix | Delete
const char *str_match;
[105] Fix | Delete
int map_value;
[106] Fix | Delete
} git_configmap;
[107] Fix | Delete
[108] Fix | Delete
/**
[109] Fix | Delete
* Locate the path to the global configuration file
[110] Fix | Delete
*
[111] Fix | Delete
* The user or global configuration file is usually
[112] Fix | Delete
* located in `$HOME/.gitconfig`.
[113] Fix | Delete
*
[114] Fix | Delete
* This method will try to guess the full path to that
[115] Fix | Delete
* file, if the file exists. The returned path
[116] Fix | Delete
* may be used on any `git_config` call to load the
[117] Fix | Delete
* global configuration file.
[118] Fix | Delete
*
[119] Fix | Delete
* This method will not guess the path to the xdg compatible
[120] Fix | Delete
* config file (.config/git/config).
[121] Fix | Delete
*
[122] Fix | Delete
* @param out Pointer to a user-allocated git_buf in which to store the path
[123] Fix | Delete
* @return 0 if a global configuration file has been found. Its path will be stored in `out`.
[124] Fix | Delete
*/
[125] Fix | Delete
GIT_EXTERN(int) git_config_find_global(git_buf *out);
[126] Fix | Delete
[127] Fix | Delete
/**
[128] Fix | Delete
* Locate the path to the global xdg compatible configuration file
[129] Fix | Delete
*
[130] Fix | Delete
* The xdg compatible configuration file is usually
[131] Fix | Delete
* located in `$HOME/.config/git/config`.
[132] Fix | Delete
*
[133] Fix | Delete
* This method will try to guess the full path to that
[134] Fix | Delete
* file, if the file exists. The returned path
[135] Fix | Delete
* may be used on any `git_config` call to load the
[136] Fix | Delete
* xdg compatible configuration file.
[137] Fix | Delete
*
[138] Fix | Delete
* @param out Pointer to a user-allocated git_buf in which to store the path
[139] Fix | Delete
* @return 0 if a xdg compatible configuration file has been
[140] Fix | Delete
* found. Its path will be stored in `out`.
[141] Fix | Delete
*/
[142] Fix | Delete
GIT_EXTERN(int) git_config_find_xdg(git_buf *out);
[143] Fix | Delete
[144] Fix | Delete
/**
[145] Fix | Delete
* Locate the path to the system configuration file
[146] Fix | Delete
*
[147] Fix | Delete
* If /etc/gitconfig doesn't exist, it will look for
[148] Fix | Delete
* %PROGRAMFILES%\Git\etc\gitconfig.
[149] Fix | Delete
*
[150] Fix | Delete
* @param out Pointer to a user-allocated git_buf in which to store the path
[151] Fix | Delete
* @return 0 if a system configuration file has been
[152] Fix | Delete
* found. Its path will be stored in `out`.
[153] Fix | Delete
*/
[154] Fix | Delete
GIT_EXTERN(int) git_config_find_system(git_buf *out);
[155] Fix | Delete
[156] Fix | Delete
/**
[157] Fix | Delete
* Locate the path to the configuration file in ProgramData
[158] Fix | Delete
*
[159] Fix | Delete
* Look for the file in %PROGRAMDATA%\Git\config used by portable git.
[160] Fix | Delete
*
[161] Fix | Delete
* @param out Pointer to a user-allocated git_buf in which to store the path
[162] Fix | Delete
* @return 0 if a ProgramData configuration file has been
[163] Fix | Delete
* found. Its path will be stored in `out`.
[164] Fix | Delete
*/
[165] Fix | Delete
GIT_EXTERN(int) git_config_find_programdata(git_buf *out);
[166] Fix | Delete
[167] Fix | Delete
/**
[168] Fix | Delete
* Open the global, XDG and system configuration files
[169] Fix | Delete
*
[170] Fix | Delete
* Utility wrapper that finds the global, XDG and system configuration files
[171] Fix | Delete
* and opens them into a single prioritized config object that can be
[172] Fix | Delete
* used when accessing default config data outside a repository.
[173] Fix | Delete
*
[174] Fix | Delete
* @param out Pointer to store the config instance
[175] Fix | Delete
* @return 0 or an error code
[176] Fix | Delete
*/
[177] Fix | Delete
GIT_EXTERN(int) git_config_open_default(git_config **out);
[178] Fix | Delete
[179] Fix | Delete
/**
[180] Fix | Delete
* Allocate a new configuration object
[181] Fix | Delete
*
[182] Fix | Delete
* This object is empty, so you have to add a file to it before you
[183] Fix | Delete
* can do anything with it.
[184] Fix | Delete
*
[185] Fix | Delete
* @param out pointer to the new configuration
[186] Fix | Delete
* @return 0 or an error code
[187] Fix | Delete
*/
[188] Fix | Delete
GIT_EXTERN(int) git_config_new(git_config **out);
[189] Fix | Delete
[190] Fix | Delete
/**
[191] Fix | Delete
* Add an on-disk config file instance to an existing config
[192] Fix | Delete
*
[193] Fix | Delete
* The on-disk file pointed at by `path` will be opened and
[194] Fix | Delete
* parsed; it's expected to be a native Git config file following
[195] Fix | Delete
* the default Git config syntax (see man git-config).
[196] Fix | Delete
*
[197] Fix | Delete
* If the file does not exist, the file will still be added and it
[198] Fix | Delete
* will be created the first time we write to it.
[199] Fix | Delete
*
[200] Fix | Delete
* Note that the configuration object will free the file
[201] Fix | Delete
* automatically.
[202] Fix | Delete
*
[203] Fix | Delete
* Further queries on this config object will access each
[204] Fix | Delete
* of the config file instances in order (instances with
[205] Fix | Delete
* a higher priority level will be accessed first).
[206] Fix | Delete
*
[207] Fix | Delete
* @param cfg the configuration to add the file to
[208] Fix | Delete
* @param path path to the configuration file to add
[209] Fix | Delete
* @param level the priority level of the backend
[210] Fix | Delete
* @param force replace config file at the given priority level
[211] Fix | Delete
* @param repo optional repository to allow parsing of
[212] Fix | Delete
* conditional includes
[213] Fix | Delete
* @return 0 on success, GIT_EEXISTS when adding more than one file
[214] Fix | Delete
* for a given priority level (and force_replace set to 0),
[215] Fix | Delete
* GIT_ENOTFOUND when the file doesn't exist or error code
[216] Fix | Delete
*/
[217] Fix | Delete
GIT_EXTERN(int) git_config_add_file_ondisk(
[218] Fix | Delete
git_config *cfg,
[219] Fix | Delete
const char *path,
[220] Fix | Delete
git_config_level_t level,
[221] Fix | Delete
const git_repository *repo,
[222] Fix | Delete
int force);
[223] Fix | Delete
[224] Fix | Delete
/**
[225] Fix | Delete
* Create a new config instance containing a single on-disk file
[226] Fix | Delete
*
[227] Fix | Delete
* This method is a simple utility wrapper for the following sequence
[228] Fix | Delete
* of calls:
[229] Fix | Delete
* - git_config_new
[230] Fix | Delete
* - git_config_add_file_ondisk
[231] Fix | Delete
*
[232] Fix | Delete
* @param out The configuration instance to create
[233] Fix | Delete
* @param path Path to the on-disk file to open
[234] Fix | Delete
* @return 0 on success, or an error code
[235] Fix | Delete
*/
[236] Fix | Delete
GIT_EXTERN(int) git_config_open_ondisk(git_config **out, const char *path);
[237] Fix | Delete
[238] Fix | Delete
/**
[239] Fix | Delete
* Build a single-level focused config object from a multi-level one.
[240] Fix | Delete
*
[241] Fix | Delete
* The returned config object can be used to perform get/set/delete operations
[242] Fix | Delete
* on a single specific level.
[243] Fix | Delete
*
[244] Fix | Delete
* Getting several times the same level from the same parent multi-level config
[245] Fix | Delete
* will return different config instances, but containing the same config_file
[246] Fix | Delete
* instance.
[247] Fix | Delete
*
[248] Fix | Delete
* @param out The configuration instance to create
[249] Fix | Delete
* @param parent Multi-level config to search for the given level
[250] Fix | Delete
* @param level Configuration level to search for
[251] Fix | Delete
* @return 0, GIT_ENOTFOUND if the passed level cannot be found in the
[252] Fix | Delete
* multi-level parent config, or an error code
[253] Fix | Delete
*/
[254] Fix | Delete
GIT_EXTERN(int) git_config_open_level(
[255] Fix | Delete
git_config **out,
[256] Fix | Delete
const git_config *parent,
[257] Fix | Delete
git_config_level_t level);
[258] Fix | Delete
[259] Fix | Delete
/**
[260] Fix | Delete
* Open the global/XDG configuration file according to git's rules
[261] Fix | Delete
*
[262] Fix | Delete
* Git allows you to store your global configuration at
[263] Fix | Delete
* `$HOME/.gitconfig` or `$XDG_CONFIG_HOME/git/config`. For backwards
[264] Fix | Delete
* compatability, the XDG file shouldn't be used unless the use has
[265] Fix | Delete
* created it explicitly. With this function you'll open the correct
[266] Fix | Delete
* one to write to.
[267] Fix | Delete
*
[268] Fix | Delete
* @param out pointer in which to store the config object
[269] Fix | Delete
* @param config the config object in which to look
[270] Fix | Delete
*/
[271] Fix | Delete
GIT_EXTERN(int) git_config_open_global(git_config **out, git_config *config);
[272] Fix | Delete
[273] Fix | Delete
/**
[274] Fix | Delete
* Create a snapshot of the configuration
[275] Fix | Delete
*
[276] Fix | Delete
* Create a snapshot of the current state of a configuration, which
[277] Fix | Delete
* allows you to look into a consistent view of the configuration for
[278] Fix | Delete
* looking up complex values (e.g. a remote, submodule).
[279] Fix | Delete
*
[280] Fix | Delete
* The string returned when querying such a config object is valid
[281] Fix | Delete
* until it is freed.
[282] Fix | Delete
*
[283] Fix | Delete
* @param out pointer in which to store the snapshot config object
[284] Fix | Delete
* @param config configuration to snapshot
[285] Fix | Delete
* @return 0 or an error code
[286] Fix | Delete
*/
[287] Fix | Delete
GIT_EXTERN(int) git_config_snapshot(git_config **out, git_config *config);
[288] Fix | Delete
[289] Fix | Delete
/**
[290] Fix | Delete
* Free the configuration and its associated memory and files
[291] Fix | Delete
*
[292] Fix | Delete
* @param cfg the configuration to free
[293] Fix | Delete
*/
[294] Fix | Delete
GIT_EXTERN(void) git_config_free(git_config *cfg);
[295] Fix | Delete
[296] Fix | Delete
/**
[297] Fix | Delete
* Get the git_config_entry of a config variable.
[298] Fix | Delete
*
[299] Fix | Delete
* Free the git_config_entry after use with `git_config_entry_free()`.
[300] Fix | Delete
*
[301] Fix | Delete
* @param out pointer to the variable git_config_entry
[302] Fix | Delete
* @param cfg where to look for the variable
[303] Fix | Delete
* @param name the variable's name
[304] Fix | Delete
* @return 0 or an error code
[305] Fix | Delete
*/
[306] Fix | Delete
GIT_EXTERN(int) git_config_get_entry(
[307] Fix | Delete
git_config_entry **out,
[308] Fix | Delete
const git_config *cfg,
[309] Fix | Delete
const char *name);
[310] Fix | Delete
[311] Fix | Delete
/**
[312] Fix | Delete
* Get the value of an integer config variable.
[313] Fix | Delete
*
[314] Fix | Delete
* All config files will be looked into, in the order of their
[315] Fix | Delete
* defined level. A higher level means a higher priority. The
[316] Fix | Delete
* first occurrence of the variable will be returned here.
[317] Fix | Delete
*
[318] Fix | Delete
* @param out pointer to the variable where the value should be stored
[319] Fix | Delete
* @param cfg where to look for the variable
[320] Fix | Delete
* @param name the variable's name
[321] Fix | Delete
* @return 0 or an error code
[322] Fix | Delete
*/
[323] Fix | Delete
GIT_EXTERN(int) git_config_get_int32(int32_t *out, const git_config *cfg, const char *name);
[324] Fix | Delete
[325] Fix | Delete
/**
[326] Fix | Delete
* Get the value of a long integer config variable.
[327] Fix | Delete
*
[328] Fix | Delete
* All config files will be looked into, in the order of their
[329] Fix | Delete
* defined level. A higher level means a higher priority. The
[330] Fix | Delete
* first occurrence of the variable will be returned here.
[331] Fix | Delete
*
[332] Fix | Delete
* @param out pointer to the variable where the value should be stored
[333] Fix | Delete
* @param cfg where to look for the variable
[334] Fix | Delete
* @param name the variable's name
[335] Fix | Delete
* @return 0 or an error code
[336] Fix | Delete
*/
[337] Fix | Delete
GIT_EXTERN(int) git_config_get_int64(int64_t *out, const git_config *cfg, const char *name);
[338] Fix | Delete
[339] Fix | Delete
/**
[340] Fix | Delete
* Get the value of a boolean config variable.
[341] Fix | Delete
*
[342] Fix | Delete
* This function uses the usual C convention of 0 being false and
[343] Fix | Delete
* anything else true.
[344] Fix | Delete
*
[345] Fix | Delete
* All config files will be looked into, in the order of their
[346] Fix | Delete
* defined level. A higher level means a higher priority. The
[347] Fix | Delete
* first occurrence of the variable will be returned here.
[348] Fix | Delete
*
[349] Fix | Delete
* @param out pointer to the variable where the value should be stored
[350] Fix | Delete
* @param cfg where to look for the variable
[351] Fix | Delete
* @param name the variable's name
[352] Fix | Delete
* @return 0 or an error code
[353] Fix | Delete
*/
[354] Fix | Delete
GIT_EXTERN(int) git_config_get_bool(int *out, const git_config *cfg, const char *name);
[355] Fix | Delete
[356] Fix | Delete
/**
[357] Fix | Delete
* Get the value of a path config variable.
[358] Fix | Delete
*
[359] Fix | Delete
* A leading '~' will be expanded to the global search path (which
[360] Fix | Delete
* defaults to the user's home directory but can be overridden via
[361] Fix | Delete
* `git_libgit2_opts()`.
[362] Fix | Delete
*
[363] Fix | Delete
* All config files will be looked into, in the order of their
[364] Fix | Delete
* defined level. A higher level means a higher priority. The
[365] Fix | Delete
* first occurrence of the variable will be returned here.
[366] Fix | Delete
*
[367] Fix | Delete
* @param out the buffer in which to store the result
[368] Fix | Delete
* @param cfg where to look for the variable
[369] Fix | Delete
* @param name the variable's name
[370] Fix | Delete
* @return 0 or an error code
[371] Fix | Delete
*/
[372] Fix | Delete
GIT_EXTERN(int) git_config_get_path(git_buf *out, const git_config *cfg, const char *name);
[373] Fix | Delete
[374] Fix | Delete
/**
[375] Fix | Delete
* Get the value of a string config variable.
[376] Fix | Delete
*
[377] Fix | Delete
* This function can only be used on snapshot config objects. The
[378] Fix | Delete
* string is owned by the config and should not be freed by the
[379] Fix | Delete
* user. The pointer will be valid until the config is freed.
[380] Fix | Delete
*
[381] Fix | Delete
* All config files will be looked into, in the order of their
[382] Fix | Delete
* defined level. A higher level means a higher priority. The
[383] Fix | Delete
* first occurrence of the variable will be returned here.
[384] Fix | Delete
*
[385] Fix | Delete
* @param out pointer to the string
[386] Fix | Delete
* @param cfg where to look for the variable
[387] Fix | Delete
* @param name the variable's name
[388] Fix | Delete
* @return 0 or an error code
[389] Fix | Delete
*/
[390] Fix | Delete
GIT_EXTERN(int) git_config_get_string(const char **out, const git_config *cfg, const char *name);
[391] Fix | Delete
[392] Fix | Delete
/**
[393] Fix | Delete
* Get the value of a string config variable.
[394] Fix | Delete
*
[395] Fix | Delete
* The value of the config will be copied into the buffer.
[396] Fix | Delete
*
[397] Fix | Delete
* All config files will be looked into, in the order of their
[398] Fix | Delete
* defined level. A higher level means a higher priority. The
[399] Fix | Delete
* first occurrence of the variable will be returned here.
[400] Fix | Delete
*
[401] Fix | Delete
* @param out buffer in which to store the string
[402] Fix | Delete
* @param cfg where to look for the variable
[403] Fix | Delete
* @param name the variable's name
[404] Fix | Delete
* @return 0 or an error code
[405] Fix | Delete
*/
[406] Fix | Delete
GIT_EXTERN(int) git_config_get_string_buf(git_buf *out, const git_config *cfg, const char *name);
[407] Fix | Delete
[408] Fix | Delete
/**
[409] Fix | Delete
* Get each value of a multivar in a foreach callback
[410] Fix | Delete
*
[411] Fix | Delete
* The callback will be called on each variable found
[412] Fix | Delete
*
[413] Fix | Delete
* The regular expression is applied case-sensitively on the normalized form of
[414] Fix | Delete
* the variable name: the section and variable parts are lower-cased. The
[415] Fix | Delete
* subsection is left unchanged.
[416] Fix | Delete
*
[417] Fix | Delete
* @param cfg where to look for the variable
[418] Fix | Delete
* @param name the variable's name
[419] Fix | Delete
* @param regexp regular expression to filter which variables we're
[420] Fix | Delete
* interested in. Use NULL to indicate all
[421] Fix | Delete
* @param callback the function to be called on each value of the variable
[422] Fix | Delete
* @param payload opaque pointer to pass to the callback
[423] Fix | Delete
*/
[424] Fix | Delete
GIT_EXTERN(int) git_config_get_multivar_foreach(const git_config *cfg, const char *name, const char *regexp, git_config_foreach_cb callback, void *payload);
[425] Fix | Delete
[426] Fix | Delete
/**
[427] Fix | Delete
* Get each value of a multivar
[428] Fix | Delete
*
[429] Fix | Delete
* The regular expression is applied case-sensitively on the normalized form of
[430] Fix | Delete
* the variable name: the section and variable parts are lower-cased. The
[431] Fix | Delete
* subsection is left unchanged.
[432] Fix | Delete
*
[433] Fix | Delete
* @param out pointer to store the iterator
[434] Fix | Delete
* @param cfg where to look for the variable
[435] Fix | Delete
* @param name the variable's name
[436] Fix | Delete
* @param regexp regular expression to filter which variables we're
[437] Fix | Delete
* interested in. Use NULL to indicate all
[438] Fix | Delete
*/
[439] Fix | Delete
GIT_EXTERN(int) git_config_multivar_iterator_new(git_config_iterator **out, const git_config *cfg, const char *name, const char *regexp);
[440] Fix | Delete
[441] Fix | Delete
/**
[442] Fix | Delete
* Return the current entry and advance the iterator
[443] Fix | Delete
*
[444] Fix | Delete
* The pointers returned by this function are valid until the iterator
[445] Fix | Delete
* is freed.
[446] Fix | Delete
*
[447] Fix | Delete
* @param entry pointer to store the entry
[448] Fix | Delete
* @param iter the iterator
[449] Fix | Delete
* @return 0 or an error code. GIT_ITEROVER if the iteration has completed
[450] Fix | Delete
*/
[451] Fix | Delete
GIT_EXTERN(int) git_config_next(git_config_entry **entry, git_config_iterator *iter);
[452] Fix | Delete
[453] Fix | Delete
/**
[454] Fix | Delete
* Free a config iterator
[455] Fix | Delete
*
[456] Fix | Delete
* @param iter the iterator to free
[457] Fix | Delete
*/
[458] Fix | Delete
GIT_EXTERN(void) git_config_iterator_free(git_config_iterator *iter);
[459] Fix | Delete
[460] Fix | Delete
/**
[461] Fix | Delete
* Set the value of an integer config variable in the config file
[462] Fix | Delete
* with the highest level (usually the local one).
[463] Fix | Delete
*
[464] Fix | Delete
* @param cfg where to look for the variable
[465] Fix | Delete
* @param name the variable's name
[466] Fix | Delete
* @param value Integer value for the variable
[467] Fix | Delete
* @return 0 or an error code
[468] Fix | Delete
*/
[469] Fix | Delete
GIT_EXTERN(int) git_config_set_int32(git_config *cfg, const char *name, int32_t value);
[470] Fix | Delete
[471] Fix | Delete
/**
[472] Fix | Delete
* Set the value of a long integer config variable in the config file
[473] Fix | Delete
* with the highest level (usually the local one).
[474] Fix | Delete
*
[475] Fix | Delete
* @param cfg where to look for the variable
[476] Fix | Delete
* @param name the variable's name
[477] Fix | Delete
* @param value Long integer value for the variable
[478] Fix | Delete
* @return 0 or an error code
[479] Fix | Delete
*/
[480] Fix | Delete
GIT_EXTERN(int) git_config_set_int64(git_config *cfg, const char *name, int64_t value);
[481] Fix | Delete
[482] Fix | Delete
/**
[483] Fix | Delete
* Set the value of a boolean config variable in the config file
[484] Fix | Delete
* with the highest level (usually the local one).
[485] Fix | Delete
*
[486] Fix | Delete
* @param cfg where to look for the variable
[487] Fix | Delete
* @param name the variable's name
[488] Fix | Delete
* @param value the value to store
[489] Fix | Delete
* @return 0 or an error code
[490] Fix | Delete
*/
[491] Fix | Delete
GIT_EXTERN(int) git_config_set_bool(git_config *cfg, const char *name, int value);
[492] Fix | Delete
[493] Fix | Delete
/**
[494] Fix | Delete
* Set the value of a string config variable in the config file
[495] Fix | Delete
* with the highest level (usually the local one).
[496] Fix | Delete
*
[497] Fix | Delete
* A copy of the string is made and the user is free to use it
[498] Fix | Delete
* afterwards.
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function