diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2015-10-20 17:42:42 +0200 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2015-10-21 15:11:18 +0200 |
commit | 8c7c5fa585c6a63dc8186febd6e032880655e85e (patch) | |
tree | 4fcfb2caf1ef82127605f03b2073ac4e75a561c8 /src/sysdir.h | |
parent | 4280fabb9f79df6c4d95b1f08b97a03874b167eb (diff) | |
download | libgit2-cmn/programdata-config.tar.gz |
config: add a ProgramData levelcmn/programdata-config
This is where portable git stores the global configuration which we can
use to adhere to it even though git isn't quite installed on the system.
Diffstat (limited to 'src/sysdir.h')
-rw-r--r-- | src/sysdir.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/sysdir.h b/src/sysdir.h index f1bbf0bae..12874fc85 100644 --- a/src/sysdir.h +++ b/src/sysdir.h @@ -39,6 +39,15 @@ extern int git_sysdir_find_xdg_file(git_buf *path, const char *filename); extern int git_sysdir_find_system_file(git_buf *path, const char *filename); /** + * Find a "ProgramData" file (i.e. one in %PROGRAMDATA%) + * + * @param path buffer to write the full path into + * @param filename name of file to find in the ProgramData directory + * @return 0 if found, GIT_ENOTFOUND if not found, or -1 on other OS error + */ +extern int git_sysdir_find_programdata_file(git_buf *path, const char *filename); + +/** * Find template directory. * * @param path buffer to write the full path into @@ -50,8 +59,9 @@ typedef enum { GIT_SYSDIR_SYSTEM = 0, GIT_SYSDIR_GLOBAL = 1, GIT_SYSDIR_XDG = 2, - GIT_SYSDIR_TEMPLATE = 3, - GIT_SYSDIR__MAX = 4, + GIT_SYSDIR_PROGRAMDATA = 3, + GIT_SYSDIR_TEMPLATE = 4, + GIT_SYSDIR__MAX = 5, } git_sysdir_t; /** |