Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chrisgarber
Copy link

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

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
@beaugunderson
Copy link
Owner

love this but how does this affect people on e.g. macOS with case-insensitive file systems?

@chrisgarber
Copy link
Author

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.

@chrisgarber
Copy link
Author

chrisgarber commented Nov 11, 2021

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?

@beaugunderson
Copy link
Owner

beaugunderson commented Nov 11, 2021 via email

@chrisgarber
Copy link
Author

chrisgarber commented Nov 12, 2021

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.

@beaugunderson
Copy link
Owner

beaugunderson commented Nov 12, 2021 via email

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

Successfully merging this pull request may close these issues.

2 participants