diff options
| author | Carlos Martín Nieto <carlos@cmartin.tk> | 2011-09-12 17:25:46 +0200 |
|---|---|---|
| committer | Carlos Martín Nieto <carlos@cmartin.tk> | 2011-09-12 17:25:46 +0200 |
| commit | f9d4b0c39569148c1fe5a4e48c00f26325f2875f (patch) | |
| tree | f96015ca8e33906603fadd527e5d3998fdaa024b /include/git2 | |
| parent | 3f3f6225f8237e974b135de30eaac731c929936e (diff) | |
| download | libgit2-f9d4b0c39569148c1fe5a4e48c00f26325f2875f.tar.gz | |
git_repository_config: open global config file automatically
If the global configuration file is missing, it is ignored.
Signed-off-by: Carlos Martín Nieto <carlos@cmartin.tk>
Diffstat (limited to 'include/git2')
| -rw-r--r-- | include/git2/repository.h | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/include/git2/repository.h b/include/git2/repository.h index 4088ff7f9..1b3254159 100644 --- a/include/git2/repository.h +++ b/include/git2/repository.h @@ -292,13 +292,10 @@ GIT_EXTERN(int) git_repository_is_bare(git_repository *repo); /** * Retrieve the relevant configuration for a repository * - * By default he returned `git_config` instance contains a single - * configuration file, the `.gitconfig' file that may be found - * inside the repository. - * - * If the `user_config_path` variable is not NULL, the given config - * file will be also included in the configuration set. On most UNIX - * systems, this file may be found on `$HOME/.gitconfig`. + * By default he returned `git_config` instance contains the two most + * common configuration files, the `config' file that may be found + * inside the repository, and the `$HOME/.gitconfig' "global" + * configuration file. * * If the `system_config_path` variable is not NULL, the given config * file will be also included in the configuration set. On most UNIX @@ -308,23 +305,21 @@ GIT_EXTERN(int) git_repository_is_bare(git_repository *repo); * order: * * - Repository configuration file - * - User configuration file + * - Global configuration file * - System configuration file * - * The method will fail if any of the passed config files cannot be - * found or accessed. + * The method will fail if any of the passed system config file found + * or accessed. * * The returned `git_config` instance is owned by the caller and must * be manually free'd once it's no longer on use. * * @param out the repository's configuration * @param repo the repository for which to get the config - * @param user_config_path Path to the user config file * @param system_config_path Path to the system-wide config file */ GIT_EXTERN(int) git_repository_config(git_config **out, git_repository *repo, - const char *user_config_path, const char *system_config_path); /** @} */ |
