X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:date:from:to:cc:subject:message-id
	:mime-version:content-type; q=dns; s=default; b=Ex93OL0Toq+7tqwx
	JA3te40dDpPEz6AvGy35gWxSi+H40yAVxGZXD92/jijbhJQ53sFiChobU6wN2nDP
	woqGJDPj0Y+j1Zny47x/JzWD8sb8lzR8ZIL53dtElorM+GedDvO63GOCnlmzLq6x
	3lvKRyaMj/G1II3VBkp9EO/KyrI=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:date:from:to:cc:subject:message-id
	:mime-version:content-type; s=default; bh=+oc6D466xyOSgSBbOgATiF
	HWAR4=; b=kr3pkBpK/Nzji/sWYgjyoK6KTDsBXnpnyOCiyAmTZyy691/QRohua3
	4VnLLAJJG2QinbZd8j6uhWk/jepb8n6R5Izm0u74yZmhekmmrDUWHz6Rgu8kBJYk
	dCCtT9mNOET1jxc5areQoz1FQvaWm/yMzIB2uOIhESquKl11AQEjU=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
X-Spam-SWARE-Status: No, score=-0.5 required=5.0 tests=BAYES_05,SPF_PASS autolearn=ham version=3.3.1
Date: Fri, 12 Jul 2013 15:42:13 +0300
From: Mikko Rapeli <mikko.rapeli@iki.fi>
To: cygwin@cygwin.com
Cc: git@vger.kernel.org
Subject: Cygwin, git and x: directory
Message-ID: <20130712124213.GL14578@lakka.kapsi.fi>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
X-SA-Exim-Connect-IP: 2001:1bc8:1004::1
X-SA-Exim-Mail-From: mikko.rapeli@iki.fi
X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false

(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

