summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorLinquize <linquize@yahoo.com.hk>2013-09-17 23:38:52 +0800
committerLinquize <linquize@yahoo.com.hk>2013-09-18 00:00:41 +0800
commitb99b10f285fec710273d1233b057ff33a6e44993 (patch)
tree2f3da9e9912743107cd4e008dbfe6d6980d451bf /src/util.c
parent7e8934bba206bf28e3f51eb583aadde051129b11 (diff)
downloadlibgit2-b99b10f285fec710273d1233b057ff33a6e44993.tar.gz
Can git_libgit2_opts() with GIT_OPT_GET_TEMPLATE_PATH and GIT_OPT_SET_TEMPLATE_PATH
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c
index d0c326ae5..4bb1f7e4e 100644
--- a/src/util.c
+++ b/src/util.c
@@ -117,6 +117,19 @@ int git_libgit2_opts(int key, ...)
*(va_arg(ap, ssize_t *)) = git_cache__current_storage.val;
*(va_arg(ap, ssize_t *)) = git_cache__max_storage;
break;
+
+ case GIT_OPT_GET_TEMPLATE_PATH:
+ {
+ char *out = va_arg(ap, char *);
+ size_t outlen = va_arg(ap, size_t);
+
+ error = git_futils_dirs_get_str(out, outlen, GIT_FUTILS_DIR_TEMPLATE);
+ }
+ break;
+
+ case GIT_OPT_SET_TEMPLATE_PATH:
+ error = git_futils_dirs_set(GIT_FUTILS_DIR_TEMPLATE, va_arg(ap, const char *));
+ break;
}
va_end(ap);