Skip to content

Conversation

emilazy
Copy link
Contributor

@emilazy emilazy commented Jan 21, 2025

Not all filesystems on Apple and Windows platforms are case‐insensitive; this test would previously fail on a case‐sensitive APFS volume.

@@ -947,6 +949,8 @@ void test_checkout_conflict__name_mangled_file_exists_in_workdir(void)
cl_git_rewritefile("merge-resolve/test-three.txt~THEIRS",
"Expect case insensitive filesystems to create ~theirs_0");

case_insensitive_fs = git_fs_path_exists("merge-resolve/test-three.txt~ours");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
case_insensitive_fs = git_fs_path_exists("merge-resolve/test-three.txt~ours");
case_insensitive_fs = cl_repo_get_bool(g_repo, "core.ignorecase");

@ethomson
Copy link
Member

Thanks! An embarrassing oversight that I think that I introduced. Now we have a simple one-liner to query the repo's configuration, so I wonder if checking core.ignorecase also works? That would likely be the most compatible query, IMO.

Not all filesystems on Apple and Windows platforms are
case‐insensitive; this test would previously fail on a
case‐sensitive APFS volume.
@emilazy emilazy changed the title conflict tests: check file system case‐sensitivity conflict tests: check core.ignorecase Jan 21, 2025
@emilazy
Copy link
Contributor Author

emilazy commented Jan 21, 2025

Looks like that works; let me know what you think!

@ethomson
Copy link
Member

Thanks for the fix!

@ethomson ethomson merged commit 1b348a3 into libgit2:main Jan 21, 2025
19 checks passed
@emilazy emilazy deleted the push-npwwprvzrmmr branch January 21, 2025 21:49
@emilazy
Copy link
Contributor Author

emilazy commented Jan 21, 2025

Thank you for the quick review and merge! 💜

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants