summaryrefslogtreecommitdiff
path: root/examples/add.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/add.c')
-rw-r--r--examples/add.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/add.c b/examples/add.c
index 6e3c239fc..542360ea9 100644
--- a/examples/add.c
+++ b/examples/add.c
@@ -48,9 +48,11 @@ int lg2_add(git_repository *repo, int argc, char **argv)
git_index_matched_path_cb matched_cb = NULL;
git_index *index;
git_strarray array = {0};
- struct index_options options;
+ struct index_options options = {0};
struct args_info args = ARGS_INFO_INIT;
+ options.mode = INDEX_ADD;
+
/* Parse the options & arguments. */
parse_opts(NULL, &options, &args);
strarray_from_args(&array, &args);