Skip to content

git status with pathspec is not case insensitive #2050

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

Closed
1 task done
michaelblyons opened this issue Feb 1, 2019 · 3 comments
Closed
1 task done

git status with pathspec is not case insensitive #2050

michaelblyons opened this issue Feb 1, 2019 · 3 comments
Labels
bug case-insensitive-fs Bug related to case-insensitive file systems git-upstream

Comments

@michaelblyons
Copy link

  • I was not able to find an open or closed issue matching what I'm seeing

Now that I know it's happening, this bug is easy to work around in my particular repository. But when I didn't know it existed, I was very confused.

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?

    $ git --version --build-options
    
    git version 2.19.0.windows.1
    cpu: x86_64
    built from commit: d96bb8bc6c636a8869140e860e72e7bdf64bd790
    sizeof-long: 4
    sizeof-size_t: 8
    
  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?

    $ cmd.exe /c ver
    
    Microsoft Windows [Version 6.1.7601]
    
  • What options did you set as part of the installation? Or did you choose the
    defaults?

    $ cat /etc/install-options.txt
    Editor Option: VIM
    Path Option: CmdTools
    SSH Option: OpenSSH
    CURL Option: OpenSSL
    CRLF Option: CRLFAlways
    Bash Terminal Option: MinTTY
    Performance Tweaks FSCache: Enabled
    Use Credential Manager: Enabled
    Enable Symlinks: Disabled
    Enable Builtin Rebase: Disabled
    Enable Builtin Stash: Disabled
    
  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

    No

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

    Bash

  • What commands did you run to trigger this issue? If you can provide a
    Minimal, Complete, and Verifiable example
    this will help us understand the issue.

    mkdir mvce
    cd mcve
    git init
    echo dog >> animals.txt
    git add .
    git commit -m "Dogs"
    echo cat >> animals.txt
    git status -- animals.txt
    git status -- Animals.txt
  • What did you expect to occur after running these commands?

    Both git status commands show that the animals.txt file has changed

  • What actually happened instead?

    The Animals.txt one did not find the Windows equivalent path

  • If the problem was occurring with a specific repository, can you provide the
    URL to that repository to help us with testing?

    Self-contained MCVE above

@dscho
Copy link
Member

dscho commented Feb 27, 2019

Yes, unfortunately this is a real bug in Git, and it is not limited to Windows: on macOS the filesystem is also case insensitive, and the problem persists. The problem is made worse by the fact that Git's index is case-sensitive.

Maybe you want to report this problem to the Git mailing list (git@vger.kernel.org)?

@dscho dscho added bug git-upstream case-insensitive-fs Bug related to case-insensitive file systems labels Feb 27, 2019
@michaelblyons
Copy link
Author

Oh, wow. I did not realize it was a general thing. Thanks, Mr. Schindelin. And thank you for 2.21!

@dscho
Copy link
Member

dscho commented Feb 28, 2019

As this is a more general problem, I'll just close it here, okay?

Of course, if you would like to work on fixing this, we can easily reopen the ticket.

@dscho dscho closed this as completed Feb 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug case-insensitive-fs Bug related to case-insensitive file systems git-upstream
Projects
None yet
Development

No branches or pull requests

2 participants