mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-28 15:58:29 +00:00
Revert "Always checkout with case sensitive iterator"
This reverts commit 40d791545a
.
This commit is contained in:
parent
6dfd8506b7
commit
3520c97057
@ -2643,7 +2643,7 @@ int git_checkout_tree(
|
||||
if ((error = git_repository_index(&index, repo)) < 0)
|
||||
return error;
|
||||
|
||||
if (!(error = git_iterator_for_tree(&tree_i, tree, GIT_ITERATOR_DONT_IGNORE_CASE, NULL, NULL)))
|
||||
if (!(error = git_iterator_for_tree(&tree_i, tree, 0, NULL, NULL)))
|
||||
error = git_checkout_iterator(tree_i, index, opts);
|
||||
|
||||
git_iterator_free(tree_i);
|
||||
|
@ -646,7 +646,14 @@ void test_checkout_tree__can_cancel_checkout_from_notify(void)
|
||||
cl_git_fail_with(git_checkout_tree(g_repo, obj, &opts), -5555);
|
||||
|
||||
cl_assert(!git_path_exists("testrepo/new.txt"));
|
||||
cl_assert_equal_i(4, ca.count);
|
||||
|
||||
/* on case-insensitive FS = a/b.txt, branch_file.txt, new.txt */
|
||||
/* on case-sensitive FS = README, then above */
|
||||
|
||||
if (git_path_exists("testrepo/.git/CoNfIg")) /* case insensitive */
|
||||
cl_assert_equal_i(3, ca.count);
|
||||
else
|
||||
cl_assert_equal_i(4, ca.count);
|
||||
|
||||
/* and again with a different stopping point and return code */
|
||||
ca.filename = "README";
|
||||
@ -656,7 +663,11 @@ void test_checkout_tree__can_cancel_checkout_from_notify(void)
|
||||
cl_git_fail_with(git_checkout_tree(g_repo, obj, &opts), 123);
|
||||
|
||||
cl_assert(!git_path_exists("testrepo/new.txt"));
|
||||
cl_assert_equal_i(1, ca.count);
|
||||
|
||||
if (git_path_exists("testrepo/.git/CoNfIg")) /* case insensitive */
|
||||
cl_assert_equal_i(4, ca.count);
|
||||
else
|
||||
cl_assert_equal_i(1, ca.count);
|
||||
|
||||
git_object_free(obj);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user