git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Cygwin, git and x: directory
@ 2013-07-12 12:42 Mikko Rapeli
  2013-07-12 15:27 ` Mark Levedahl
  0 siblings, 1 reply; 2+ messages in thread
From: Mikko Rapeli @ 2013-07-12 12:42 UTC (permalink / raw)
  To: cygwin; +Cc: git

(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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Cygwin, git and x: directory
  2013-07-12 12:42 Cygwin, git and x: directory Mikko Rapeli
@ 2013-07-12 15:27 ` Mark Levedahl
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Levedahl @ 2013-07-12 15:27 UTC (permalink / raw)
  To: Mikko Rapeli; +Cc: cygwin, git

On 07/12/2013 08:42 AM, Mikko Rapeli wrote:
> (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:


I would report this on the Cygwin list, not here. Any use of dos file 
paths using a Cygwin tool is not recommended, officially only POSIX 
paths are supported. If cygwin's Cmake is generating dos style paths, 
that is a bug that needs reporting to the Cygwin list. Also, I'm not 
sure how the developers will react to mishandling a directory named x:, 
but the behaviour you see is a limitation of the Cygwin platform, not of 
git.

Mark

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-07-12 15:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-12 12:42 Cygwin, git and x: directory Mikko Rapeli
2013-07-12 15:27 ` Mark Levedahl

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).