Commit 3520c970 by Edward Thomson Committed by Edward Thomson

Revert "Always checkout with case sensitive iterator"

This reverts commit 40d79154.
parent 6dfd8506
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment