8000 Bindings/libgit2sharp/020 2 by grossvin22 · Pull Request #3337 · libgit2/libgit2 · GitHub
[go: up one dir, main page]

Skip to content

Bindings/libgit2sharp/020 2 #3337

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 20 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Always checkout with case sensitive iterator
On a case-insensitive filesystem, we need to deal with case-changing
renames (eg, foo -> FOO) by removing the old and adding the new,
exactly as if we were on a case-sensitive filesystem.

Update the `checkout::tree::can_cancel_checkout_from_notify` test, now
that notifications are always sent case sensitively.
  • Loading branch information
Edward Thomson committed Jan 19, 2015
commit 4a30c53146e7d1068af6f02dba3ef925878d11b8
2 changes: 1 addition & 1 deletion src/checkout.c
Original file line number Diff line number Diff line change
Expand Up @@ -2458,7 +2458,7 @@ int git_checkout_tree(
}
}

if (!(error = git_iterator_for_tree(&tree_i, tree, 0, NULL, NULL)))
if (!(error = git_iterator_for_tree(&tree_i, tree, GIT_ITERATOR_DONT_IGNORE_CASE, NULL, NULL)))
error = git_checkout_iterator(tree_i, opts);

git_iterator_free(tree_i);
Expand Down
15 changes: 2 additions & 13 deletions tests/checkout/tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -645,14 +645,7 @@ 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"));

/* 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);
cl_assert_equal_i(4, ca.count);

/* and again with a different stopping point and return code */
ca.filename = "README";
Expand All @@ -662,11 +655,7 @@ 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"));

if (git_path_exists("testrepo/.git/CoNfIg")) /* case insensitive */
cl_assert_equal_i(4, ca.count);
else
cl_assert_equal_i(1, ca.count);
cl_assert_equal_i(1, ca.count);

git_object_free(obj);
}
Expand Down
0