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(
2722
2722
if ((error = git_repository_index (& index , repo )) < 0 )
2723
2723
return error ;
2724
2724
2725
- if ((opts -> checkout_strategy & GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH )) {
2725
+ if (opts && (opts -> checkout_strategy & GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH )) {
2726
2726
iter_opts .pathlist .count = opts -> paths .count ;
2727
2727
iter_opts .pathlist .strings = opts -> paths .strings ;
2728
2728
}
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)
1479
1479
git_reference_free (head );
1480
1480
}
1481
1481
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