stripe-android icon indicating copy to clipboard operation
stripe-android copied to clipboard

[BUG] Impossible to clone stripe-android GitHub repository on Windows

Open DeveloperLookBook opened this issue 11 months ago • 1 comments

Summary

During the cloning process I get the error:

error: invalid path 'ml-core:base/dependencies/dependencies.txt'
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 :/'

Steps to reproduce

Use any GitHub UI (Sourcetree, VS Code or GitHub Desctop) to clone the repository on Windows.

DeveloperLookBook avatar Mar 27 '24 10:03 DeveloperLookBook

Hi @DeveloperLookBook Can you try running a git clone from your CLI to clone the project instead?

seanzhang-stripe avatar Apr 11 '24 09:04 seanzhang-stripe

Closing this since we haven't heard back. Let us know if you're still having issues.

jaynewstrom-stripe avatar May 24 '24 19:05 jaynewstrom-stripe

Hi,

Just want to make a note on this for future Windows users. The reason for the error is that : is not a valid character in Windows filenames. So when attempting to git clone, the : in all the those folders are replaced with bad characters and then the filepath is basically corrupt. If you try to git clone into a Windows path with WSL, you won't get the error in the OP but the directories are still bad. Basically, you won't be able to checkout this repo on Windows at all because of the filename structure.

But it looks like you can download the source code release ZIP, and use any third-party archive solution (7Zip, NanaZip, etc) to extract the directory and the colons will be replaced with underscores.

I don't know if this affects the use of the repo but at least the files are available.

daddycocoaman avatar Jul 22 '24 19:07 daddycocoaman