-
Notifications
You must be signed in to change notification settings - Fork 134
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
Fix a test on NTFS (and probably HFS+) #151
Conversation
/submit |
Submitted as pull.151.git.gitgitgadget@gmail.com |
/submit |
Submitted as pull.151.v2.git.gitgitgadget@gmail.com |
On a case-insensitive filesystem, such as HFS+ or NTFS, it is possible that the idea Bash has of the current directory differs in case from what Git thinks it is. That's totally okay, though, and we should not expect otherwise. On Windows, for example, when you call cd C:\GIT-SDK-64 in a PowerShell and there exists a directory called `C:\git-sdk-64`, the current directory will be reported in all upper-case. Even in a Bash that you might call from that PowerShell. Git, however, will have normalized this via `GetFinalPathByHandle()`, and the expectation in t0001 that the recorded gitdir will match what `pwd` says will be violated. Let's address this by comparing these paths in a case-insensitive manner when `core.ignoreCase` is `true`. Reported by Jameson Miller. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
/submit |
Submitted as pull.151.v3.git.gitgitgadget@gmail.com |
This branch is now known as |
This patch series was integrated into pu via git@cf51456. |
This patch series was integrated into pu via git@29fa1b9. |
This patch series was integrated into pu via git@7e461a9. |
This patch series was integrated into pu via git@f43e0d1. |
This patch series was integrated into pu via git@9153f47. |
This patch series was integrated into pu via git@2fa1cdf. |
This patch series was integrated into next via git@6c0001a. |
This patch series was integrated into pu via git@e3a0a3e. |
This patch series was integrated into pu via git@52e197a. |
This patch series was integrated into pu via git@e59ff88. |
This patch series was integrated into pu via git@dd7c0b9. |
This patch series was integrated into pu via git@cf538f5. |
This patch series was integrated into pu via git@7a65961. |
This patch series was integrated into pu via git@bf8126f. |
This patch series was integrated into next via git@bf8126f. |
This patch series was integrated into master via git@bf8126f. |
Closed via bf8126f. |
My colleague Jameson Miller once presented me with a nice puzzle why the test suite failed on their system.
Turns out that it is possible in PowerShell to spell the directory with a different case than on disk in
cd <directory>
, and subsequent calls to get the current working directory will use that case, rather than what is recorded on disk. And since case-insensitive filesystems are frowned upon in the Linux world, Git's test suite was not prepared for such a scenario.Changes since v2:
test_cmp
, we now introducetest_cmp_fspath
(as suggested by Junio).Changes since v1:
git config
call is now safe-guarded with a--type=bool
.git config
call now actually looks at the correct config variable:core.ignoreCase
;-)Cc: Martin Ågren martin.agren@gmail.com, brian m. carlson sandals@crustytoothpaste.net