diff options
| author | Vicent Martà <tanoku@gmail.com> | 2011-09-18 19:58:22 -0700 |
|---|---|---|
| committer | Vicent Martà <tanoku@gmail.com> | 2011-09-18 19:58:22 -0700 |
| commit | 6640266e5ae2d366765ab4b669ce15113adfc23e (patch) | |
| tree | 9141bc2ead07a5131ec3480e44897fe19c62c879 /include/git2 | |
| parent | 71b84c639a516aa995026766815122214fcc4b0d (diff) | |
| parent | f9d4b0c39569148c1fe5a4e48c00f26325f2875f (diff) | |
| download | libgit2-6640266e5ae2d366765ab4b669ce15113adfc23e.tar.gz | |
Merge pull request #398 from carlosmn/config-autohome
git_repository_config: open global config file automatically
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 9c4eb0985..d12cfbec7 100644 --- a/include/git2/repository.h +++ b/include/git2/repository.h @@ -284,13 +284,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 @@ -300,23 +297,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); /** @} */ |
