-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Setup
- Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
$ git --version --build-options
git version 2.28.0.windows.1
cpu: x86_64
built from commit: 77982caf269b7ee713a76da2bcf260c34d3bf7a7
sizeof-long: 4
sizeof-size_t: 8
shell-path: /bin/sh
- Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
$ cmd.exe /c ver
Microsoft Windows [Versión 10.0.17763.1339]
- What options did you set as part of the installation? Or did you choose the
defaults?
# One of the following:
> type "C:\Program Files\Git\etc\install-options.txt"
> type "C:\Program Files (x86)\Git\etc\install-options.txt"
> type "%USERPROFILE%\AppData\Local\Programs\Git\etc\install-options.txt"
$ cat /etc/install-options.txt
Editor Option: Notepad++
Custom Editor Path:
Path Option: Cmd
SSH Option: OpenSSH
Tortoise Option: false
CURL Option: OpenSSL
CRLF Option: CRLFAlways
Bash Terminal Option: MinTTY
Git Pull Behavior Option: Merge
Use Credential Manager: Enabled
Performance Tweaks FSCache: Enabled
Enable Symlinks: Disabled
Enable Pseudo Console Support: Disabled
- Any other interesting things about your environment that might be related
to the issue you're seeing?
Nothing special about the enviroment. Can reproduce on a fresh install.
However, the repository I'm working with contains a folder with filenames considered invalid on Windows (e.g :
)
Details
- Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other
CMD
- 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.
git config core.sparseCheckout true
(echo /* & echo !other.7z) >.git\info\sparse-checkout
git checkout
- What did you expect to occur after running these commands?
The repository would be checked out except for the folder other.7z
, which contains filenames considered invalid on Windows.
Works as expected if I downgrade to a version older than 2.25.0, such as 2.24.0 or 2.23.0.
- What actually happened instead?
git reports invalid path errors and doesn't check out the repository, despite the path being excluded by the sparse checkout
error: invalid path 'other.7z/NEWS.7z/NEWS/テープリストア/NEWS_04/NEWS_04.tar/home/sugiyama/fly/CON.CGX'
error: invalid path 'other.7z/NEWS.7z/NEWS/テープリストア/NEWS_04/NEWS_04.tar/home/sugiyama/fly/CON.CGX.BAK'
error: invalid path 'other.7z/NEWS.7z/NEWS/テープリストア/NEWS_04/NEWS_04.tar/home/sugiyama/fly/CON.COL'
error: invalid path 'other.7z/NEWS.7z/NEWS/テープリストア/NEWS_04/NEWS_04.tar/home/sugiyama/fly/CON.COL.BAK'
error: invalid path 'other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/5000vi.lzh/srd|/current_dir'
error: invalid path 'other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/5000vi.lzh/srd|/var/current_dir'
error: invalid path 'other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/5000vi.lzh/srd|/var/srd/current_dir'
error: invalid path 'other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/kimura/exp/:'
error: invalid path 'other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/kimura/fzero.lzh/fzero/RP5A22:'
error: invalid path 'other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/kimura/fzero.lzh/fzero/RP5C77:'
error: invalid path 'other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/kimura/kart/mak.lzh/mak/:'
error: invalid path 'other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/kimura/msdos/prn.c'
error: invalid path 'other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/kimura/util/...'
error: invalid path 'other.7z/NEWS.7z/NEWS/テープリストア/NEWS_05/NEWS_05.tar/home/kimura/util/prn.c'
- If the problem was occurring with a specific repository, can you provide the
URL to that repository to help us with testing?
https://github.com/XXLuigiMario/gigaleak
EDIT: Found the origin of this issue, this is caused by the core.protectNTFS
setting. Disabling it lets the checkout go through without issues. However, this is a bug because no problematic paths are involved in this checkout!