File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -2722,7 +2722,7 @@ int git_checkout_tree(
27222722 if ((error = git_repository_index (& index , repo )) < 0 )
27232723 return error ;
27242724
2725- if ((opts -> checkout_strategy & GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH )) {
2725+ if (opts && (opts -> checkout_strategy & GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH )) {
27262726 iter_opts .pathlist .count = opts -> paths .count ;
27272727 iter_opts .pathlist .strings = opts -> paths .strings ;
27282728 }
Original file line number Diff line number Diff line change @@ -1479,3 +1479,7 @@ void test_checkout_tree__baseline_is_empty_when_no_index(void)
14791479 git_reference_free (head );
14801480}
14811481
1482+ void test_checkout_tree__nullopts (void )
1483+ {
1484+ cl_git_pass (git_checkout_tree (g_repo , NULL , NULL ));
1485+ }
You can’t perform that action at this time.
0 commit comments