Windows and colon in filename in repo

747 views
Skip to first unread message

rays...@yahoo.com

unread,
Sep 3, 2016, 9:22:12 AM9/3/16
to git-for-windows
I am wondering if any progress has been made on handling colons in filenames since 1.9.5.msysgit.1. I read the thread 'How to play around with the filename with colon on Windows?' from last year which doesn't seem to have a solution. I also read 'git - Sparse checkout not working as expected (colons in filenames on Windows)' where the only working solution afaics is the one proposed by Johannes Schindelin, set core.protectntfs to false. That's undesirable because the repo I want to clone is a wiki and other people can edit it.

So far I am doing it like this:

mkdir wiki
cd wiki
git init
git config core.sparseCheckout true
printf '*\n!Survey:-curl-and-libcurl-2015.md\n' > .git/info/sparse-checkout
git remote add -f upstream g...@github.com:curl/curl.wiki.git
git pull upstream master
git checkout master
# error
git config core.protectntfs false
git reset --hard
# ok

So was this ever addressed, is there a better workaround that does not need core.protectntfs disabled?

Thanks

Johannes Sixt

unread,
Sep 3, 2016, 11:53:07 AM9/3/16
to rays...@yahoo.com, git-for-windows
Am 03.09.2016 um 08:47 schrieb raysatiro via git-for-windows:
> So far I am doing it like this:
>
> mkdir wiki
> cd wiki
> git init
> git config core.sparseCheckout true
> printf '*\n!Survey:-curl-and-libcurl-2015.md\n' > .git/info/sparse-checkout
> git remote add -f upstream g...@github.com:curl/curl.wiki.git
> git pull upstream master
> git checkout master
> # error
> git config core.protectntfs false
> git reset --hard
> # ok
>
> So was this ever addressed, is there a better workaround that does not
> need core.protectntfs disabled?

AFAICS, there cannot be a solution. File names on Windows cannot have
colons. End of story. Your only option is sparse-checkout.

-- Hannes

Reply all
Reply to author
Forward
0 new messages