mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-07 18:11:43 +00:00
Merge pull request #3907 from steffhip/git_checkout_tree-fix
This commit is contained in:
commit
a08e88259f
@ -2722,7 +2722,7 @@ int git_checkout_tree(
|
|||||||
if ((error = git_repository_index(&index, repo)) < 0)
|
if ((error = git_repository_index(&index, repo)) < 0)
|
||||||
return error;
|
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.count = opts->paths.count;
|
||||||
iter_opts.pathlist.strings = opts->paths.strings;
|
iter_opts.pathlist.strings = opts->paths.strings;
|
||||||
}
|
}
|
||||||
|
@ -1479,3 +1479,7 @@ void test_checkout_tree__baseline_is_empty_when_no_index(void)
|
|||||||
git_reference_free(head);
|
git_reference_free(head);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void test_checkout_tree__nullopts(void)
|
||||||
|
{
|
||||||
|
cl_git_pass(git_checkout_tree(g_repo, NULL, NULL));
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user