learnbyexample/py_regular_expressions

Pull/clone fails on Windows because of invalid characters

jonathannoah opened this issue · 2 comments

The file code_snippets/Interlude:_Common_tasks.py causes checkout to fail on Windows due to the presence of a colon in the filename.

λ git clone --depth=1 https://github.com/learnbyexample/py_regular_expressions
Cloning into 'py_regular_expressions'...
remote: Enumerating objects: 45, done.
remote: Counting objects: 100% (45/45), done.
remote: Compressing objects: 100% (44/44), done.
remote: Total 45 (delta 3), reused 21 (delta 1), pack-reused 0R
Receiving objects: 100% (45/45), 892.26 KiB | 3.91 MiB/s, done.
Resolving deltas: 100% (3/3), done.
error: invalid path 'code_snippets/Interlude:_Common_tasks.py'
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'

Descending into the directory and running git restore --source=HEAD :/ restores the files except "Interlude:_Common_tasks.py". Running git config core.protectNTFS false followed by git checkout also checks out all the files, however "Interlude:_Common_tasks.py" is replaced with a 0-byte file called "Interlude".

I didn't know that. Thanks for the issue. I've renamed the file now, please let me know if this resolves the issue.

Yep, works perfectly! Thank you!