vendor/libgit2/src/checkout.c in rugged-0.25.0b7 vs vendor/libgit2/src/checkout.c in rugged-0.25.0b8
- old
+ new
@@ -2720,10 +2720,10 @@
}
if ((error = git_repository_index(&index, repo)) < 0)
return error;
- if ((opts->checkout_strategy & GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH)) {
+ if (opts && (opts->checkout_strategy & GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH)) {
iter_opts.pathlist.count = opts->paths.count;
iter_opts.pathlist.strings = opts->paths.strings;
}
if (!(error = git_iterator_for_tree(&tree_i, tree, &iter_opts)))