]>
git.proxmox.com Git - libgit2.git/blob - src/config.h
2 * Copyright (C) 2009-2012 the libgit2 contributors
4 * This file is part of libgit2, distributed under the GNU GPL v2 with
5 * a Linking Exception. For full terms see the included COPYING file.
7 #ifndef INCLUDE_config_h__
8 #define INCLUDE_config_h__
11 #include "git2/config.h"
13 #include "repository.h"
15 #define GIT_CONFIG_FILENAME ".gitconfig"
16 #define GIT_CONFIG_FILENAME_ALT ".config/git/config"
17 #define GIT_CONFIG_FILENAME_INREPO "config"
18 #define GIT_CONFIG_FILENAME_SYSTEM "gitconfig"
19 #define GIT_CONFIG_FILE_MODE 0666
26 extern int git_config_find_global_r(git_buf
*global_config_path
);
27 extern int git_config_find_xdg_r(git_buf
*system_config_path
);
28 extern int git_config_find_system_r(git_buf
*system_config_path
);
30 extern int git_config_rename_section(
32 const char *old_section_name
, /* eg "branch.dummy" */
33 const char *new_section_name
); /* NULL to drop the old section */
36 * Create a configuration file backend for ondisk files
38 * These are the normal `.gitconfig` files that Core Git
39 * processes. Note that you first have to add this file to a
40 * configuration object before you can query it for configuration
43 * @param out the new backend
44 * @param path where the config file is located
46 extern int git_config_file__ondisk(struct git_config_backend
**out
, const char *path
);