GeezerVison is showing github.com — check-case-conflict doesn't notice directory name conflicts · Issue #70 · pre-commit/pre-commit-hooks
check-case-conflict doesn't notice directory name conflicts #70
Description
$ 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.
Reacted by Sergio Valverde
Activity
guykisel commented on Jun 17, 2015
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 commented on Oct 26, 2020
asottile commented on Oct 26, 2020
@dizel3d it has not, that is why this issue is still open
added 3 commits that reference this issue
on Mar 19, 2021This issue will close once commit 9a35b62 is merged into the 'master' branch.9a35b62 This issue will close once commit e567150 is merged into the 'master' branch.e567150 This issue will close once commit fd797fa is merged into the 'master' branch.fd797fa added a commit that references this issue
on Apr 4, 2021This issue will close once commit f681234 is merged into the 'master' branch.f681234
Metadata
Metadata
Development
No branches or pull requestsIssue actions