X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Message-ID: <4C08115C.9020605@kitware.com> Date: Thu, 03 Jun 2010 16:32:28 -0400 From: Bill Hoffman 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> In-Reply-To: <4C080E71.5000608@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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:20 PM, Eric Blake wrote: > On 06/03/2010 02:03 PM, Bill Hoffman wrote: >> Can someone explain why if I use c:/some/path as an argument to git >> clone, it fails. But if I use /cygdrive/c/some/path it works. > > Because c:/some/path looks like you are asking for protocol:file for > talking to a remote machine, while /cygdrive/c/some/path makes it > obvious that you are asking for a local path, and because git is > compiled to behave in a posix manner. > > If drive letters work, great for you. But if they don't, I am not going > to spend any time beating up the source code to make them work. They > are intentionally unsupported here - we prefer posix paths for a reason. > OK, if that is really what is happening. However, that does not seem to explain the translation of paths that I am seeing. '/cygdrive/c/Users/hoffman/Work/My Builds/CMake-gmake/f/c:/Users/hoffman/Work/My Builds/CMake-gmake/Tests/ExternalProject/LocalRepositories/GIT/objects' It is using the current directory smashed together with the c: path that I gave it. I would expect something different if git thought that I was talking about a remote machine called c:. Something like this: $ git clone fooba:/Users/hoffman/Work/My\ Builds/CMake-gmake/Tests/ExternalProject/LocalRepositories/GIT a Initialized empty Git repository in /cygdrive/c/Users/hoffman/Work/My Builds/CMake-gmake/a/.git/ ssh: Could not resolve hostname fooba: hostname nor servname provided, or not known fatal: The remote end hung up unexpectedly Instead I get something like this: $ git clone c:/Users/hoffman/Work/My\ Builds/CMake-gmake/Tests/ExternalProject/LocalRepositories/GIT 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:/Users/hoffman/Work/My Builds/CMake-gmake/Tests/ExternalProject/LocalRepositories/GIT/objects': No such file or directory Which is failed to open: /cygdrive/c/current/dir/c:/path/given I have seen something similar with another program as well. It seems that something changed in the cygwin dll recently that is affecting the Path handling with driver letters. I was hoping someone could explain what changed, so I could work around the change and know what to expect. I don't think this is an issue specific to git. 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