This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Cygwin, git and x: directory
- From: Mikko Rapeli <mikko dot rapeli at iki dot fi>
- To: cygwin at cygwin dot com
- Cc: git at vger dot kernel dot org
- Date: Fri, 12 Jul 2013 15:42:13 +0300
- Subject: Cygwin, git and x: directory
(please Cc: me in replies, not subscribed to the lists)
Hi Cygwin and git developers,
Does following scenario show signs of bugs in Cygwin and/or git?
# setup git repo
$ cd /tmp
$ mkdir foo && cd foo
$ git init
# create x: directory
$ mkdir x:
$ ls
x:
# create Windows X: drive, cygwin utils can work with both unix and dos style
# path names
$ mkdir c:/temp/bar
$ subst x: c:/temp/bar
$ touch x:/file.txt
$ ls x:/
file.txt
# clean git tree from non-tracked files
$ git clean -d -x -f
Removing x:/
# observe results, git did rm -rf on the X drive instead of the local
# directory named x:
$ ls
x:
$ file x\:
x:: directory
$ ls x:/
ls: cannot access x:/: No such file or directory
$ ls c:/temp/bar
ls: cannot access c:/temp/bar: No such file or directory
$ subst
X:\: => C:\temp\bar
In real life CMake created C: file in a build tree -- which is also a bug
but a separate one -- which resulted in obviously catastrophic results.
-Mikko
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple