-
Notifications
You must be signed in to change notification settings - Fork 28
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
feat: codeowners case sensitivity #23
base: master
Are you sure you want to change the base?
Conversation
CODEOWNERS is a case sensitive file. We can still use the ignore library, we just need to update it and pass a flag. - adds tests (jest) - adds a launcher for VS code to debug tests - updates ignore library - passes flag to ensure case sensitivity to ignore library
love this but how does this affect people on e.g. macOS with case-insensitive file systems? |
I don't think it should have an effect. The issue is that GitHub cares, because it doesn't know what os you're using. If your file system is case insensitive, that's great, but your CODEOWNERS still needs to match the case of the files in your project. |
I'm trying to think of a case where this would mess up someone working on a mac. I work on a mac as well and was curious why github has behaving differently to this library, this was what I found. Do you have a case where this wouldn't work or would break something in mind? |
we've had issues where mac git doesn't care, and our software doesn't care,
but devs end up with files with different case on their machines (maybe
someone changed case of a file later or something); and this would now
prevent `codeowners` from seeing that file as the same
maybe we could make this a flag and change the default using a module like
this?
https://www.npmjs.com/package/fs-file-name-sensitive
https://www.npmjs.com/package/dir-is-case-sensitive
…On Thu, Nov 11, 2021 at 11:30 AM, chrisgarber ***@***.***> wrote:
I don't think it should have an effect. The issue is that GitHub cares,
because it doesn't know what os you're using. If your file system is case
insensitive, that's great, but your CODEOWNERS still needs to match the
case of the files in your project.
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#23 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAPCX7NS22WW6UN4AFDRALULQKWPANCNFSM5H3EHMUA>
.
|
I'm beginning to see the fundamental problem here. Git's file system is always case sensitive, but on case-insensitive systems differently cased files/dirs can't be distinguished. This can lead to hidden files: if you have a image.jpg and an image.JPG the insensitive file system will only display one of them, but the remote will hold both. Unfortunately, for CODEOWNERS it doesn't matter how the OS sees the file system, because the git remote is the true arbiter of how it is applied. When it comes down to it case insensitive file systems can become out sync with the file system of their remotes. Teams that work with a mix of file systems should be aware of these challenges and endeavor to come to file naming standards. Since CODEOWNERS enforces case sensitivity I believe this repo should as well. I could be convinced to allow a case insensitive check with a flag, but I think this would lead users in the wrong direction, as CODEOWNERS is always case sensitive. It does seem like there's a tool or two missing in the ecosystem to either ensure that files and dirs are lowercased, or to correct potential casing issues. There is this action to check for those conflicting file paths I mentioned earlier, but it would be nice if there were a utility I could run on my case insensitive system to "correct" the casing of files. |
yes, we used a webpack plugin to enforce that the on-disk capitalization
matched the import capitalization because we had one Linux developer who
ran into issues when it was not enforced (rare, but they did happen)
…On Fri, Nov 12, 2021 at 7:57 AM, chrisgarber ***@***.***> wrote:
I'm beginning to see the fundamental problem here. Git's file system is
always case sensitive, but on case-insensitive systems differently cased
files/dirs can't be distinguished. This can lead to hidden files: if you
have a image.jpg and an image.JPG the insensitive file system will only
display one of them, but the remote will hold both.
Unfortunately, for CODEOWNERS it doesn't matter how the OS sees the file
system, because the git remote is the true arbiter of how it is applied.
When it comes down to it case insensitive file systems can become out sync
with the file system of their remotes. Teams that work with a mix of file
systems should be aware of these challenges and endeavor to come to file
naming standards. Since CODEOWNERS enforces case sensitivity I believe this
repo should as well. I could be convinced to allow a case insensitive check
with a flag, but I think this would lead users in the wrong direction, as
CODEOWNERS is always case sensitive.
It does seem like there's a tool or two missing in the ecosystem to either
ensure the casing of a file system, or to correct potential casing issues.
There is this action
<https://github.com/marketplace/actions/case-sensitivity-checker> to
check for those conflicting file paths I mentioned earlier, but it would be
nice if there were a utility I could run on my case insensitive system to
"correct" the casing of files.
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#23 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAPCX4WAUBU3XBS2QCGDULULU2O3ANCNFSM5H3EHMUA>
.
|
CODEOWNERS is a case sensitive file. We can still use the ignore library, we just need to update it and pass a flag.