Sparse checkout not working as expected (colons in filenames on Windows)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, I was expecting that sparse checkout could be used to avoid the checking out, by git, of files which have colons in their name into the worktree when on Windows.

Yue Lin Ho reported on the Msygit list [1] that he had a repo where there was already committed a file with a colon in it's name, which was a needed file and had been committed by a Linux user. The problem was how to work with that repo on a Windows box where such a file is prohibited to exist on the FS (hence the expectation that a sparse checkout would suffice). Yue has created a short test repo [2]

Even after getting the pathspec escaping right, I still haven't been able to make this expected behaviour work [3].

Am I wrong to expect that sparse checkout (and the skip-worktree bit) can be used to avoid files with undesirable filenames hitting the OS's file system?

If it should be OK, what's the correct recipe?

--
Philip

[1] https://groups.google.com/forum/?hl=en_US?hl%3Den#!topic/msysgit/D4HcHRpxPgU "How to play around with the filename with colon on Windows?"
[2] Test repo https://github.com/t-pascal/tortoisegit-colons

[3] test sequence::
$ mkdir colons && cd colons
$ git clone -n https://github.com/t-pascal/tortoisegit-colons
$ cd tortoisegit-colons/
$ git config core.sparseCheckout true
$ cat .git/info/sparse-checkout # external editor
/*
!ifcfg-eth0\:0
$ git update-index --skip-worktree -- ifcfg-eth0\:0
Ignoring path ifcfg-eth0:0
$ git checkout -b test 7f35d34bc6160cc # tip commit, we are still unborn!
error: Invalid path 'ifcfg-eth0:0
D       ifcfg-eth0:0
Switched to a new branch 'test'





--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]