Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Straub <bs@github.com>2012-11-30 02:06:40 +0400
committerBen Straub <bs@github.com>2012-12-01 01:12:14 +0400
commitb81aa2f1deb98eb7f9e60ac96696e69a9a49d8f8 (patch)
treec9319fc7252b87c183dc6d7ed9296c0e48f50f5a /src/reset.c
parentf4fc9fdba03dd4975229243d7c1debd00c9d1f18 (diff)
Deploy GIT_CHECKOUT_OPTS_INIT
Diffstat (limited to 'src/reset.c')
-rw-r--r--src/reset.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/reset.c b/src/reset.c
index d410a8806..17b4b900c 100644
--- a/src/reset.c
+++ b/src/reset.c
@@ -69,7 +69,7 @@ int git_reset(
git_index *index = NULL;
git_tree *tree = NULL;
int error = -1;
- git_checkout_opts opts;
+ git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;
assert(repo && target);
assert(reset_type == GIT_RESET_SOFT
@@ -136,7 +136,6 @@ int git_reset(
goto cleanup;
}
- memset(&opts, 0, sizeof(opts));
opts.checkout_strategy = GIT_CHECKOUT_FORCE;
if (git_checkout_index(repo, NULL, &opts) < 0) {