summaryrefslogtreecommitdiff
path: root/src/submodule.c
diff options
context:
space:
mode:
authorBen Straub <bs@github.com>2012-11-29 20:06:23 -0800
committerBen Straub <bs@github.com>2012-11-30 13:12:15 -0800
commitb4d136527c2210f1abbcc53ab7290ad38029ab3c (patch)
tree7753fecb682417d37611a09fea8ef092fe70e894 /src/submodule.c
parent9267ff586f29deb99f41ab6eeb0599917ddd0cec (diff)
downloadlibgit2-b4d136527c2210f1abbcc53ab7290ad38029ab3c.tar.gz
Deploy GIT_REPOSITORY_INIT_OPTIONS_INIT
Diffstat (limited to 'src/submodule.c')
-rw-r--r--src/submodule.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/submodule.c b/src/submodule.c
index 7ac666c73..21a1875c2 100644
--- a/src/submodule.c
+++ b/src/submodule.c
@@ -205,7 +205,7 @@ int git_submodule_add_setup(
git_config_backend *mods = NULL;
git_submodule *sm;
git_buf name = GIT_BUF_INIT, real_url = GIT_BUF_INIT;
- git_repository_init_options initopt;
+ git_repository_init_options initopt = GIT_REPOSITORY_INIT_OPTIONS_INIT;
git_repository *subrepo = NULL;
assert(repo && url && path);
@@ -275,7 +275,6 @@ int git_submodule_add_setup(
* Old style: sub-repo goes directly into repo/<name>/.git/
*/
- memset(&initopt, 0, sizeof(initopt));
initopt.flags = GIT_REPOSITORY_INIT_MKPATH |
GIT_REPOSITORY_INIT_NO_REINIT;
initopt.origin_url = real_url.ptr;