delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/06/03/17:07:56

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00
X-Spam-Check-By: sourceware.org
Message-ID: <4C08199D.5010907@kitware.com>
Date: Thu, 03 Jun 2010 17:07:41 -0400
From: Bill Hoffman <bill DOT hoffman AT kitware DOT com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.9) Gecko/20100317 Lightning/1.0b1 Thunderbird/3.0.4
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: C: vs /cygdrive/c and git
References: <4C080A98 DOT 8090004 AT kitware DOT com> <4C080E71 DOT 5000608 AT redhat DOT com> <4C08115C DOT 9020605 AT kitware DOT com> <4C0812E4 DOT 502 AT redhat DOT com>
In-Reply-To: <4C0812E4.502@redhat.com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On 6/3/2010 4:39 PM, Eric Blake wrote:
> On 06/03/2010 02:32 PM, Bill Hoffman wrote:

> In that case, git is just blindly treating c: as ./c: - that is, the
> relative file named "c:" in the current directory.  Since POSIX allows
> this interpretation, there's no reason for git to special case it and
> try otherwise.
>
I am still not convinced....

It seems that if I try git clone c:/foobar

If there is a c:/foobar then it does current_dir/c:/foobar.  However, if 
c:/foobar does not exist, it then treats c as a machine name.

$ git clone c:/foobar a
Initialized empty Git repository in /cygdrive/c/Users/hoffman/Work/My 
Builds/CMake-gmake/a/.git/
ssh: Could not resolve hostname c: hostname nor servname provided, or 
not known
fatal: The remote end hung up unexpectedly

$ mkdir c:/foobar

$ git clone c:/foobar a
Initialized empty Git repository in /cygdrive/c/Users/hoffman/Work/My 
Builds/CMake-gmake/a/.git/
fatal: failed to open '/cygdrive/c/Users/hoffman/Work/My 
Builds/CMake-gmake/c:/foobar/objects': No such file or directory

So, it is not just assuming that c:/foobar is a file named "c:" because 
it must find that c:/foobar exists on the disk before it tries to append 
it to the current directory.   If c:/foobar does not exist, then git 
tries a remote machine named c.

Again, I don't think this is git specific, but I would like to 
understand at what level of cygwin this is coming from.

Thanks.

-Bill

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019