Cannot clone repo on Windows #19

Open
opened 2023-08-30 17:40:20 -04:00 by celtic-coder · 6 comments
celtic-coder commented 2023-08-30 17:40:20 -04:00 (Migrated from github.com)

Hi Acmeism (@acmeism) / Ingy (@ingydotnet),

This in an excellent project! I am sure that many developers will find it useful. However, there appears to be a problem cloning the repo on Windows.

As per the "Getting the Data" section in the ReadMe, I tried the following command:

git clone https://github.com/acmeism/RosettaCodeData --single-branch --depth=1

The initial portion of the clone command worked, but it then failed with an invalid path error:

Cloning into 'RosettaCodeData'...
remote: Enumerating objects: 283863, done.
remote: Counting objects: 100% (283863/283863), done.
remote: Compressing objects: 100% (168129/168129), done.
remote: Total 283863 (delta 5568), reused 280218 (delta 5540), pack-reused 0
Receiving objects: 100% (283863/283863), 52.34 MiB | 3.61 MiB/s, done.

Resolving deltas: 100% (5568/5568), done.
error: invalid path 'Lang/11l/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors'
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 :/'

My guess for the failure is that the ":" is an invalid character in the Windows filesystem. Might it be possible to change a colon character in a filename to the valid "-" character instead?

Kind Regards,
Liam

[comment]: # (https://github.com/acmeism/RosettaCodeData/issues/??) Hi Acmeism (@acmeism) / Ingy (@ingydotnet), This in an excellent project! I am sure that many developers will find it useful. However, there appears to be a problem cloning the repo on Windows. As per the "Getting the Data" section in the [ReadMe](https://github.com/acmeism/RosettaCodeData#getting-the-data), I tried the following command: `git clone https://github.com/acmeism/RosettaCodeData --single-branch --depth=1` The initial portion of the clone command worked, but it then failed with an **invalid path** error: ``` Cloning into 'RosettaCodeData'... remote: Enumerating objects: 283863, done. remote: Counting objects: 100% (283863/283863), done. remote: Compressing objects: 100% (168129/168129), done. remote: Total 283863 (delta 5568), reused 280218 (delta 5540), pack-reused 0 Receiving objects: 100% (283863/283863), 52.34 MiB | 3.61 MiB/s, done. Resolving deltas: 100% (5568/5568), done. error: invalid path 'Lang/11l/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors' 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 :/' ``` My guess for the failure is that the ":" is an invalid character in the Windows filesystem. Might it be possible to change a colon character in a filename to the valid "-" character instead? Kind Regards, Liam
TheOneTrueGuy commented 2024-04-19 12:06:35 -04:00 (Migrated from github.com)

I too am running into this issue. Is anyone still working on this project? I noticed in the RosettaCode-pm project that provides services for this there was an update 10 months ago for 2023 but it looks like nothing in this repo has been updated in years and years.

I too am running into this issue. Is anyone still working on this project? I noticed in the RosettaCode-pm project that provides services for this there was an update 10 months ago for 2023 but it looks like nothing in this repo has been updated in years and years.
ingydotnet commented 2024-04-25 04:45:46 -04:00 (Migrated from github.com)

https://github.com/acmeism/RosettaCodeData/commits/main/

The repo has been updated many times in the last year.
Last update was 5 days ago.

I recently got a Windows machine. I can look into this sometime soon.

https://github.com/acmeism/RosettaCodeData/commits/main/ The repo has been updated many times in the last year. Last update was 5 days ago. I recently got a Windows machine. I can look into this sometime soon.
celtic-coder commented 2024-04-30 19:12:44 -04:00 (Migrated from github.com)

Hi Ingy, (@ingydotnet),

This evening I retried the "git clone" command as noted above:

git clone https://github.com/acmeism/RosettaCodeData --single-branch --depth=1

The same error occurred, as in the previous attempt:

invalid path 'Lang/11l/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors'

It is quite possible that there are many more "invalid path" errors due to the "colon" character in the pathname. So, it may take some work to resolve this issue.

Thanks for saying that you will take some time to look into this issue.

Kind Regards,
Liam

Hi Ingy, (@ingydotnet), This evening I retried the "git clone" command as noted above: ~~~ git clone https://github.com/acmeism/RosettaCodeData --single-branch --depth=1 ~~~ The same error occurred, as in the previous attempt: ~~~ invalid path 'Lang/11l/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors' ~~~ It is quite possible that there are many more "invalid path" errors due to the "colon" character in the pathname. So, it may take some work to resolve this issue. Thanks for saying that you will take some time to look into this issue. Kind Regards, Liam
ingydotnet commented 2024-05-06 18:36:48 -04:00 (Migrated from github.com)

https://gist.github.com/ingydotnet/b4a1d20dc95490fa1d3c2a59b6758565

417 bad paths.

Should be pretty easy to not use :.

Can try to address manually.

$ find . -type d | grep : | while read -r p; do echo "$(dirname "$p")"; done | grep : | sort | uniq
./Task/Sequence:-nth-number-with-exactly-n-divisors
./Task/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors
./Task/Sequence:-smallest-number-with-exactly-n-divisors

Only 3 dirs...

OK I ran

$ find . -type d | grep : | while read -r p; do echo "$(dirname "$p")"; done | grep : | sort | uniq | while read -r p; do git mv "$p" "${p//:/}"; done
$ find . -type f | grep : | while read -r p; do git mv "$p" "${p//:/}"; done
$ find . -type l | grep : | while read -r p; do git mv "$p" "${p//:/}"; done

possibly cleaner way but this is just a test.

No more paths with : although there are some broken symlinks.

I pushed to branch https://github.com/acmeism/RosettaCodeData/tree/remove-colons

@celtic-coder can you git clone --branch=remove-colons ... and report back if at least the clone works on windows.

If so I'll fix up the build tool properly.

Thanks for your patience :)

https://gist.github.com/ingydotnet/b4a1d20dc95490fa1d3c2a59b6758565 417 bad paths. Should be pretty easy to not use `:`. Can try to address manually. ``` $ find . -type d | grep : | while read -r p; do echo "$(dirname "$p")"; done | grep : | sort | uniq ./Task/Sequence:-nth-number-with-exactly-n-divisors ./Task/Sequence:-smallest-number-greater-than-previous-term-with-exactly-n-divisors ./Task/Sequence:-smallest-number-with-exactly-n-divisors ``` Only 3 dirs... OK I ran ``` $ find . -type d | grep : | while read -r p; do echo "$(dirname "$p")"; done | grep : | sort | uniq | while read -r p; do git mv "$p" "${p//:/}"; done $ find . -type f | grep : | while read -r p; do git mv "$p" "${p//:/}"; done $ find . -type l | grep : | while read -r p; do git mv "$p" "${p//:/}"; done ``` possibly cleaner way but this is just a test. No more paths with `:` although there are some broken symlinks. I pushed to branch https://github.com/acmeism/RosettaCodeData/tree/remove-colons @celtic-coder can you `git clone --branch=remove-colons ...` and report back if at least the clone works on windows. If so I'll fix up the build tool properly. Thanks for your patience :)
celtic-coder commented 2024-05-09 12:06:36 -04:00 (Migrated from github.com)

Hi Ingy, (@ingydotnet),

Thanks for making these changes! It will be a few days before I can get around to testing this.

When I have the opportunity, I will get back to you on this.

Kind regards,
Liam

Hi Ingy, (@ingydotnet), Thanks for making these changes! It will be a few days before I can get around to testing this. When I have the opportunity, I will get back to you on this. Kind regards, Liam
celtic-coder commented 2024-05-11 16:22:05 -04:00 (Migrated from github.com)

Hi Ingy, (@ingydotnet),

I ran the following command:

git clone --single-branch --depth=1 --branch=remove-colons https://github.com/acmeism/RosettaCodeData

We now have a further example of an "invalid path" error:

error: invalid path 'Lang/Burlesque/Eulers-constant-0.5772...'
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.

The two culprits with "multiple dots" in the filename appear to be:

Eulers-constant-0.5772...
Four-is-the-number-of-letters-in-the-...

These appear in both the "Lang" and "Task" sections.

Kind Regards,
Liam

Hi Ingy, (@ingydotnet), I ran the following command: ~~~ git clone --single-branch --depth=1 --branch=remove-colons https://github.com/acmeism/RosettaCodeData ~~~ We now have a further example of an "invalid path" error: ~~~ error: invalid path 'Lang/Burlesque/Eulers-constant-0.5772...' fatal: unable to checkout working tree warning: Clone succeeded, but checkout failed. ~~~ The two culprits with "multiple dots" in the filename appear to be: ~~~ Eulers-constant-0.5772... Four-is-the-number-of-letters-in-the-... ~~~ These appear in both the "Lang" and "Task" sections. Kind Regards, Liam
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: aparler/RosettaCodeData#19
No description provided.