diff options
| author | Carlos Martín Nieto <cmn@dwim.me> | 2013-05-06 21:51:25 +0200 |
|---|---|---|
| committer | Carlos Martín Nieto <cmn@dwim.me> | 2013-05-07 21:42:56 +0200 |
| commit | a4b75dcf56bc8e6d295cae89e2f5871c4707af21 (patch) | |
| tree | 1024da87132452386ab7bbe9ee826457727596d2 /src/config.h | |
| parent | 3405f78754703948475b4677d03fcdbfb099b6a4 (diff) | |
| download | libgit2-a4b75dcf56bc8e6d295cae89e2f5871c4707af21.tar.gz | |
repo: unconditionally create a global config backend
When a repository is initialised, we need to probe to see if there is
a global config to load. If this is not the case, the user isn't able
to write to the global config without creating the backend and adding
it themselves, which is inconvenient and overly complex.
Unconditionally create and add a backend for the global config file
regardless of whether it exists as a convenience for users.
To enable this, we allow creating backends to files that do not exist
yet, changing the semantics somewhat, and making some tests invalid.
Diffstat (limited to 'src/config.h')
| -rw-r--r-- | src/config.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/config.h b/src/config.h index c43e47e82..c5c11ae14 100644 --- a/src/config.h +++ b/src/config.h @@ -28,6 +28,9 @@ extern int git_config_find_global_r(git_buf *global_config_path); extern int git_config_find_xdg_r(git_buf *system_config_path); extern int git_config_find_system_r(git_buf *system_config_path); + +extern int git_config__global_location(git_buf *buf); + extern int git_config_rename_section( git_repository *repo, const char *old_section_name, /* eg "branch.dummy" */ |
