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

check-case-conflict doesn't notice directory name conflicts #70

Closed
andyjack opened this issue Jun 17, 2015 · 3 comments · Fixed by #575
Closed

check-case-conflict doesn't notice directory name conflicts #70

andyjack opened this issue Jun 17, 2015 · 3 comments · Fixed by #575

Comments

@andyjack
Copy link

$ git status
On branch master

Initial commit

Changes to be committed:
  (use "git rm --cached <file>..." to unstage)

    new file:   TEST/foo
    new file:   test/bar

$ git commit -m "Test"
Check for case conflicts...................................................................................Passed
[master (root-commit) 6931ba5] Test
 2 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 TEST/foo
 create mode 100644 test/bar

$ cat .pre-commit-config.yaml
- repo: git://github.com/pre-commit/pre-commit-hooks
  sha: '0d88124ef6343fbbc6c9d2872853f73546c98a3f'
  hooks:
      - id: check-case-conflict

A conflict such as Test/foo and test/foo is caught though.

@guykisel
Copy link
Contributor

Whoops, I think this is my fault. This is a use case I didn't think of.

To fix this I'm thinking that when we generate the set of relevant files to check for conflicts, we should also add to the set all of the parent directories/paths of those relevant files. This has the potential to get messy/inefficient though.

@dizel3d
Copy link

dizel3d commented Oct 26, 2020

@guykisel Has it been fixed?

@asottile
Copy link
Member

@dizel3d it has not, that is why this issue is still open

slsyy added a commit to slsyy/pre-commit-hooks-1 that referenced this issue Mar 19, 2021
slsyy added a commit to slsyy/pre-commit-hooks-1 that referenced this issue Mar 19, 2021
slsyy added a commit to slsyy/pre-commit-hooks-1 that referenced this issue Mar 19, 2021
asottile pushed a commit to slsyy/pre-commit-hooks-1 that referenced this issue Apr 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

4 participants