-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Drive letter case-sensitive #735
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
Comments
Hmm, can you try something for me, I have a hunch: C:\> git add /C:\repo\file.txt |
It returns this:
|
@midlan: OK, thanks. I'm trying to determine if this has anything to do with MSYS POSIX path conversion or not, or maybe something with C:\> git add C:/repo/file.txt
REM If this doesn't work, maybe also try:
C:\> git add /C:/repo/file.txt For the record, since you're in a command prompt, I wouldn't think this to be the case, but, like I said, for thoroughness. |
But I don't understand why you're not trying it on your PC. You don't use windows? |
@midlan Traditionally, the Git for Windows project suffers no shortage of bug reporters, but a shortage of contributors who dive into the code and fix bugs (keep in mind that Git for Windows is downloaded ~1.5 million times, yet there are fewer active Git for Windows contributors than you have fingers on your right hand). That means that people in the latter category invariably have to pick and choose which fraction of the bug reports they work on. One easy way to triage the tickets is to assess how much the bug reporters are willing to work on the problem themselves: it is much more fun to work on those tickets, and they also have a much better chance of being resolved quickly. Hence I encourage you to consider adding a test to Git's regression test suite, and contributing this as a Pull Request. See the test suite documentation and a good example of a test. Let's take a look at your MCVE (thanks BTW for making one that works! You'd be surprised how surprising that is to frequent readers of this here bug tracker): mkdir "c:\repo"
cmd /K "cd c:\repo\"
git init
echo "content" > file.txt
git add C:\repo\file.txt The first thing to notice is that we cannot go and create top-level directories in And then we do not even need the interactive Inside a shell script, we can get at the absolute Windows path with: So here is a sketch how to get the absolute path to the current directory with a drive letter that has the opposite case of what Git expects it to be: dir="$(pwd -W)" &&
case "$dir" in
[A-Za-z]:*)
# change case of the drive letter only
drive_letter="$(echo "${dir%%:*}" | tr "A-Za-z" "a-zA-Z")" &&
dir2="$drive_letter${dir#?}"
;;
*)
[... skip test...]
esac Another thing to note: we will want to guard the test so that it only runs on Windows because it makes little sense to run it on, say, Linux (and Git's source code is kept adamantly cross-platform). So it should look somewhat like this: test_expect_failure MINGW 'drive letter is case-insensitive' '
...
' (I say "failure" here because it is a known breakage.) |
Calling `git add` with an absolute path using different upper/lower case than recorded on disk [will now work as expected](git-for-windows/git#735) instead of claiming that the paths are outside the repository. Signed-off-by: Johannes Schindelin <[email protected]>
If the file system is case-insensitive, we really must be careful to ignore differences in case only. This fixes #735 Signed-off-by: Johannes Schindelin <[email protected]>
If the file system is case-insensitive, we really must be careful to ignore differences in case only. This fixes #735 Signed-off-by: Johannes Schindelin <[email protected]>
If the file system is case-insensitive, we really must be careful to ignore differences in case only. This fixes #735 Signed-off-by: Johannes Schindelin <[email protected]>
If the file system is case-insensitive, we really must be careful to ignore differences in case only. This fixes #735 Signed-off-by: Johannes Schindelin <[email protected]>
If the file system is case-insensitive, we really must be careful to ignore differences in case only. This fixes #735 Signed-off-by: Johannes Schindelin <[email protected]>
If the file system is case-insensitive, we really must be careful to ignore differences in case only. This fixes #735 Signed-off-by: Johannes Schindelin <[email protected]>
If the file system is case-insensitive, we really must be careful to ignore differences in case only. This fixes #735 Signed-off-by: Johannes Schindelin <[email protected]>
If the file system is case-insensitive, we really must be careful to ignore differences in case only. This fixes #735 Signed-off-by: Johannes Schindelin <[email protected]>
If the file system is case-insensitive, we really must be careful to ignore differences in case only. This fixes #735 Signed-off-by: Johannes Schindelin <[email protected]>
If the file system is case-insensitive, we really must be careful to ignore differences in case only. This fixes #735 Signed-off-by: Johannes Schindelin <[email protected]>
If the file system is case-insensitive, we really must be careful to ignore differences in case only. This fixes #735 Signed-off-by: Johannes Schindelin <[email protected]>
If the file system is case-insensitive, we really must be careful to ignore differences in case only. This fixes #735 Signed-off-by: Johannes Schindelin <[email protected]>
If the file system is case-insensitive, we really must be careful to ignore differences in case only. This fixes #735 Signed-off-by: Johannes Schindelin <[email protected]>
If the file system is case-insensitive, we really must be careful to ignore differences in case only. This fixes #735 Signed-off-by: Johannes Schindelin <[email protected]>
If the file system is case-insensitive, we really must be careful to ignore differences in case only. This fixes #735 Signed-off-by: Johannes Schindelin <[email protected]>
If the file system is case-insensitive, we really must be careful to ignore differences in case only. This fixes #735 Signed-off-by: Johannes Schindelin <[email protected]>
If the file system is case-insensitive, we really must be careful to ignore differences in case only. This fixes #735 Signed-off-by: Johannes Schindelin <[email protected]>
If the file system is case-insensitive, we really must be careful to ignore differences in case only. This fixes git-for-windows#735 Signed-off-by: Johannes Schindelin <[email protected]>
If the file system is case-insensitive, we really must be careful to ignore differences in case only. This fixes #735 Signed-off-by: Johannes Schindelin <[email protected]>
If the file system is case-insensitive, we really must be careful to ignore differences in case only. This fixes #735 Signed-off-by: Johannes Schindelin <[email protected]>
If the file system is case-insensitive, we really must be careful to ignore differences in case only. This fixes #735 Signed-off-by: Johannes Schindelin <[email protected]>
If the file system is case-insensitive, we really must be careful to ignore differences in case only. This fixes #735 Signed-off-by: Johannes Schindelin <[email protected]>
If the file system is case-insensitive, we really must be careful to ignore differences in case only. This fixes git-for-windows#735 Signed-off-by: Johannes Schindelin <[email protected]>
If the file system is case-insensitive, we really must be careful to ignore differences in case only. This fixes git-for-windows#735 Signed-off-by: Johannes Schindelin <[email protected]>
If the file system is case-insensitive, we really must be careful to ignore differences in case only. This fixes git-for-windows#735 Signed-off-by: Johannes Schindelin <[email protected]>
If the file system is case-insensitive, we really must be careful to ignore differences in case only. This fixes #735 Signed-off-by: Johannes Schindelin <[email protected]>
If the file system is case-insensitive, we really must be careful to ignore differences in case only. This fixes git-for-windows#735 Signed-off-by: Johannes Schindelin <[email protected]>
If the file system is case-insensitive, we really must be careful to ignore differences in case only. This fixes #735 Signed-off-by: Johannes Schindelin <[email protected]>
If the file system is case-insensitive, we really must be careful to ignore differences in case only. This fixes #735 Signed-off-by: Johannes Schindelin <[email protected]>
If the file system is case-insensitive, we really must be careful to ignore differences in case only. This fixes #735 Signed-off-by: Johannes Schindelin <[email protected]>
If the file system is case-insensitive, we really must be careful to ignore differences in case only. This fixes git-for-windows#735 Signed-off-by: Johannes Schindelin <[email protected]>
If the file system is case-insensitive, we really must be careful to ignore differences in case only. This fixes git-for-windows#735 Signed-off-by: Johannes Schindelin <[email protected]>
If the file system is case-insensitive, we really must be careful to ignore differences in case only. This fixes #735 Signed-off-by: Johannes Schindelin <[email protected]>
If the file system is case-insensitive, we really must be careful to ignore differences in case only. This fixes git-for-windows#735 Signed-off-by: Johannes Schindelin <[email protected]>
If the file system is case-insensitive, we really must be careful to ignore differences in case only. This fixes #735 Signed-off-by: Johannes Schindelin <[email protected]>
If the file system is case-insensitive, we really must be careful to ignore differences in case only. This fixes #735 Signed-off-by: Johannes Schindelin <[email protected]>
If the file system is case-insensitive, we really must be careful to ignore differences in case only. This fixes git-for-windows#735 Signed-off-by: Johannes Schindelin <[email protected]>
If the file system is case-insensitive, we really must be careful to ignore differences in case only. This fixes git-for-windows#735 Signed-off-by: Johannes Schindelin <[email protected]>
If the file system is case-insensitive, we really must be careful to ignore differences in case only. This fixes git-for-windows#735 Signed-off-by: Johannes Schindelin <[email protected]>
If the file system is case-insensitive, we really must be careful to ignore differences in case only. This fixes git-for-windows#735 Signed-off-by: Johannes Schindelin <[email protected]>
If the file system is case-insensitive, we really must be careful to ignore differences in case only. This fixes git-for-windows#735 Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
If the file system is case-insensitive, we really must be careful to ignore differences in case only. This fixes git-for-windows#735 Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
or closed issue
matching what I'm seeing
Setup
output of
git version
as well.64-bit
Windows 10 Pro 64-bit
defaults?
yes, defaults, git in %PATH%
to the issue you're seeing?
no
Details
windows native cmd.exe
Minimal, Complete, and Verifiable example
this will help us understand the issue.
When your drive letter in step 2 is lower-case (in this example
c:
) and in step 5 is upper-case it will cause fatal. I think it's a bug, because windows path is case-insensitive.Adding a file.txt to future commit.
URL to that repository to help us with testing?
no, it's global problem
The text was updated successfully, but these errors were encountered: