🌐 US-Proxy
class="logged-out env-production page-responsive" style="word-wrap: break-word;" >
Skip to content

conflict tests: check core.ignorecase - #7026

Merged
ethomson merged 1 commit into
libgit2:mainfrom
emilazy:push-npwwprvzrmmr
Jan 21, 2025
Merged

conflict tests: check core.ignorecase#7026
ethomson merged 1 commit into
libgit2:mainfrom
emilazy:push-npwwprvzrmmr

Conversation

@emilazy

@emilazy emilazy commented Jan 21, 2025

Copy link
Copy Markdown
Contributor

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

Comment thread tests/libgit2/checkout/conflict.c Outdated
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
Copy Markdown
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
Copy Markdown
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

emilazy commented Jan 21, 2025

Copy link
Copy Markdown
Contributor Author

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

@ethomson

Copy link
Copy Markdown
Member

Thanks for the fix!

@ethomson
ethomson merged commit 1b348a3 into libgit2:main Jan 21, 2025
@emilazy
emilazy deleted the push-npwwprvzrmmr branch January 21, 2025 21:49
@emilazy

emilazy commented Jan 21, 2025

Copy link
Copy Markdown
Contributor Author

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