#ifndef INCLUDE_config_h__
#define INCLUDE_config_h__
#include "common.h"
#include "git2.h"
#include "git2/config.h"
#include "vector.h"
#include "repository.h"
#define GIT_CONFIG_FILENAME_PROGRAMDATA "config"
#define GIT_CONFIG_FILENAME_SYSTEM "gitconfig"
#define GIT_CONFIG_FILENAME_GLOBAL ".gitconfig"
#define GIT_CONFIG_FILENAME_XDG "config"
#define GIT_CONFIG_FILENAME_INREPO "config"
#define GIT_CONFIG_FILE_MODE 0666
struct git_config {
git_refcount rc;
git_vector backends;
};
extern int git_config__global_location(git_buf *buf);
extern int git_config_rename_section(
git_repository *repo,
const char *old_section_name,
const char *new_section_name);
extern int git_config__normalize_name(const char *in, char **out);
extern int git_config__lookup_entry(
git_config_entry **out,
const git_config *cfg,
const char *key,
bool no_errors);
extern int git_config__update_entry(
git_config *cfg,
const char *key,
const char *value,
bool overwrite_existing,
bool only_if_existing);
extern char *git_config__get_string_force(
const git_config *cfg, const char *key, const char *fallback_value);
extern int git_config__get_bool_force(
const git_config *cfg, const char *key, int fallback_value);
extern int git_config__get_int_force(
const git_config *cfg, const char *key, int fallback_value);
extern int git_config__configmap_lookup(
int *out, git_config *config, git_configmap_item item);
int git_config_lookup_map_enum(git_configmap_t *type_out,
const char **str_out, const git_configmap *maps,
size_t map_n, int enum_val);
GIT_EXTERN(int) git_config_unlock(git_config *cfg, int commit);
#endif