diff options
| author | Linquize <linquize@yahoo.com.hk> | 2013-09-17 23:29:02 +0800 |
|---|---|---|
| committer | Linquize <linquize@yahoo.com.hk> | 2013-09-17 23:29:02 +0800 |
| commit | 7e8934bba206bf28e3f51eb583aadde051129b11 (patch) | |
| tree | 01d3ee077cf5aadb88b6f362fb07b8a697209f6e /src/fileops.c | |
| parent | f84bc3885327670babbfed1e351036d113fce903 (diff) | |
| download | libgit2-7e8934bba206bf28e3f51eb583aadde051129b11.tar.gz | |
Can guess win32 git template dir
Diffstat (limited to 'src/fileops.c')
| -rw-r--r-- | src/fileops.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/fileops.c b/src/fileops.c index 4dfc8a533..b7ae94b75 100644 --- a/src/fileops.c +++ b/src/fileops.c @@ -624,15 +624,25 @@ static int git_futils_guess_xdg_dirs(git_buf *out) #endif } +static int git_futils_guess_template_dirs(git_buf *out) +{ +#ifdef GIT_WIN32 + return git_win32__find_system_dirs(out, L"share\\git-core\\templates"); +#else + return git_buf_sets(out, "/usr/share/git-core/templates"); +#endif +} + typedef int (*git_futils_dirs_guess_cb)(git_buf *out); static git_buf git_futils__dirs[GIT_FUTILS_DIR__MAX] = - { GIT_BUF_INIT, GIT_BUF_INIT, GIT_BUF_INIT }; + { GIT_BUF_INIT, GIT_BUF_INIT, GIT_BUF_INIT, GIT_BUF_INIT }; static git_futils_dirs_guess_cb git_futils__dir_guess[GIT_FUTILS_DIR__MAX] = { git_futils_guess_system_dirs, git_futils_guess_global_dirs, git_futils_guess_xdg_dirs, + git_futils_guess_template_dirs, }; int git_futils_dirs_global_init(void) |
