]> git.proxmox.com Git - libgit2.git/blob - src/config.h
Merge pull request #968 from arrbee/diff-support-typechange
[libgit2.git] / src / config.h
1 /*
2 * Copyright (C) 2009-2012 the libgit2 contributors
3 *
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.
6 */
7 #ifndef INCLUDE_config_h__
8 #define INCLUDE_config_h__
9
10 #include "git2.h"
11 #include "git2/config.h"
12 #include "vector.h"
13 #include "repository.h"
14
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
20
21 struct git_config {
22 git_refcount rc;
23 git_vector files;
24 };
25
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);
29
30 extern int git_config_parse_bool(int *out, const char *bool_string);
31
32 extern int git_config_lookup_map_value(
33 git_cvar_map *maps, size_t map_n, const char *value, int *out);
34
35 #endif