diff --git a/src/checkout.c b/src/checkout.c index 478130879..b70ea1892 100644 --- a/src/checkout.c +++ b/src/checkout.c @@ -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); diff --git a/tests/checkout/tree.c b/tests/checkout/tree.c index 7b0eae411..3bc9c9364 100644 --- a/tests/checkout/tree.c +++ b/tests/checkout/tree.c @@ -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); }