diff options
author | Russell Belfer <rb@github.com> | 2012-07-31 17:02:54 -0700 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2012-08-22 16:07:19 -0700 |
commit | ca1b6e54095a7e28d468a832f143025feae6cd4f (patch) | |
tree | 0ff9b9fbf71cd4f0489985b64f57590687361cd2 /include/git2/config.h | |
parent | 662880ca60e4d1662bb10648522242ac54797720 (diff) | |
download | libgit2-ca1b6e54095a7e28d468a832f143025feae6cd4f.tar.gz |
Add template dir and set gid to repo init
This extends git_repository_init_ext further with support for
initializing the repository from an external template directory
and with support for the "create shared" type flags that make a
set GID repository directory.
This also adds tests for much of the new functionality to the
existing `repo/init.c` test suite.
Also, this adds a bunch of new utility functions including a
very general purpose `git_futils_mkdir` (with the ability to
make paths and to chmod the paths post-creation) and a file
tree copying function `git_futils_cp_r`. Also, this includes
some new path functions that were useful to keep the code
simple.
Diffstat (limited to 'include/git2/config.h')
-rw-r--r-- | include/git2/config.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/git2/config.h b/include/git2/config.h index f415fbd9..58a23833 100644 --- a/include/git2/config.h +++ b/include/git2/config.h @@ -91,6 +91,18 @@ GIT_EXTERN(int) git_config_find_system(char *system_config_path, size_t length); GIT_EXTERN(int) git_config_open_global(git_config **out); /** + * Open the global and system configuration files + * + * Utility wrapper that finds the global and system configuration files + * and opens them into a single prioritized config object that can be + * used when accessing config data outside a repository. + * + * @param out Pointer to store the config instance + * @return 0 or an error code + */ +GIT_EXTERN(int) git_config_open_outside_repo(git_config **out); + +/** * Create a configuration file backend for ondisk files * * These are the normal `.gitconfig` files that Core Git |