summaryrefslogtreecommitdiff
path: root/src/submodule.c
diff options
context:
space:
mode:
authorVicent Martí <vicent@github.com>2012-12-05 11:47:19 -0800
committerVicent Martí <vicent@github.com>2012-12-05 11:47:19 -0800
commite05ca13f1f3550f59790c0f992841abceee1b4c5 (patch)
treea01c119011d0c6020c9288096d09ed055c475bd8 /src/submodule.c
parenta541eafa606b58e7ce3df8e496da8e032fdb74ec (diff)
parentee1c33b146a366260a4648b1f29f470fedaca0fa (diff)
downloadlibgit2-e05ca13f1f3550f59790c0f992841abceee1b4c5.tar.gz
Merge pull request #1115 from ben/struct-versions
Version info for public structs
Diffstat (limited to 'src/submodule.c')
-rw-r--r--src/submodule.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/submodule.c b/src/submodule.c
index c117255d4..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;
@@ -1439,7 +1438,7 @@ static int submodule_wd_status(unsigned int *status, git_submodule *sm)
if (sm_repo != NULL) {
git_tree *sm_head;
- git_diff_options opt;
+ git_diff_options opt = GIT_DIFF_OPTIONS_INIT;
git_diff_list *diff;
/* the diffs below could be optimized with an early termination
@@ -1452,7 +1451,6 @@ static int submodule_wd_status(unsigned int *status, git_submodule *sm)
if ((error = git_repository_head_tree(&sm_head, sm_repo)) < 0)
return error;
- memset(&opt, 0, sizeof(opt));
if (sm->ignore == GIT_SUBMODULE_IGNORE_NONE)
opt.flags |= GIT_DIFF_INCLUDE_UNTRACKED;