{"thread":{"id":"34417","subject":"Cygwin, git and x: directory","startedAt":"2013-07-12T12:42:13Z","lastAt":"2013-07-12T15:27:14Z","messageCount":2,"participants":["Mikko Rapeli","Mark Levedahl"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"223163","messageId":"20130712124213.GL14578@lakka.kapsi.fi","threadId":"34417","inReplyTo":null,"subject":"Cygwin, git and x: directory","fromName":"Mikko Rapeli","fromEmail":"mikko.rapeli@iki.fi","sentAt":"2013-07-12T12:42:13Z","receivedAt":"2013-07-12T12:42:13Z","isPatch":false,"sender":{"key":"mikko.rapeli@iki.fi","avatar":"https://avatars.githubusercontent.com/u/2036278?v=4"},"body":"(please Cc: me in replies, not subscribed to the lists)\n\nHi Cygwin and git developers,\n\nDoes following scenario show signs of bugs in Cygwin and/or git?\n\n# setup git repo\n$ cd /tmp\n$ mkdir foo && cd foo\n$ git init\n\n# create x: directory\n$ mkdir x:\n$ ls\nx:\n\n# create Windows X: drive, cygwin utils can work with both unix and dos style\n# path names\n$ mkdir c:/temp/bar\n$ subst x: c:/temp/bar\n$ touch x:/file.txt\n$ ls x:/\nfile.txt\n\n# clean git tree from non-tracked files\n$ git clean -d -x -f\nRemoving x:/\n\n# observe results, git did rm -rf on the X drive instead of the local\n# directory named x:\n$ ls\nx:\n$ file x\\:\nx:: directory\n$ ls x:/\nls: cannot access x:/: No such file or directory\n$ ls c:/temp/bar\nls: cannot access c:/temp/bar: No such file or directory\n$ subst\nX:\\: => C:\\temp\\bar\n\nIn real life CMake created C: file in a build tree -- which is also a bug\nbut a separate one -- which resulted in obviously catastrophic results.\n\n-Mikko\n"},{"id":"223165","messageId":"51E02052.4050804@gmail.com","threadId":"34417","inReplyTo":"20130712124213.GL14578@lakka.kapsi.fi","subject":"Re: Cygwin, git and x: directory","fromName":"Mark Levedahl","fromEmail":"mlevedahl@gmail.com","sentAt":"2013-07-12T15:27:14Z","receivedAt":"2013-07-12T15:27:14Z","isPatch":false,"sender":{"key":"mdl123@verizon.net","avatar":"https://avatars.githubusercontent.com/u/5302462?v=4"},"body":"On 07/12/2013 08:42 AM, Mikko Rapeli wrote:\n> (please Cc: me in replies, not subscribed to the lists)\n>\n> Hi Cygwin and git developers,\n>\n> Does following scenario show signs of bugs in Cygwin and/or git?\n>\n> # setup git repo\n> $ cd /tmp\n> $ mkdir foo && cd foo\n> $ git init\n>\n> # create x: directory\n> $ mkdir x:\n> $ ls\n> x:\n\n\nI would report this on the Cygwin list, not here. Any use of dos file \npaths using a Cygwin tool is not recommended, officially only POSIX \npaths are supported. If cygwin's Cmake is generating dos style paths, \nthat is a bug that needs reporting to the Cygwin list. Also, I'm not \nsure how the developers will react to mishandling a directory named x:, \nbut the behaviour you see is a limitation of the Cygwin platform, not of \ngit.\n\nMark\n"}]}