#ifndef INCLUDE_config_h__
#define INCLUDE_config_h__
#include "git2.h"
#include "git2/config.h"
#include "vector.h"
#include "repository.h"
#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 files;
};
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_file__ondisk(git_config_backend **out, const char *path);
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__cvar(
int *out, git_config *config, git_cvar_cached cvar);
#endif