Fix 'clone' failure at DOS root directory.
commitde2ba333c02f1dd128a548f0802c58da834481f4
authorEric Sunshine <sunshine@sunshineco.com>
Wed, 7 Jul 2010 01:48:47 +0000 (6 21:48 -0400)
committerJohannes Schindelin <johannes.schindelin@gmx.de>
Wed, 25 Aug 2010 10:28:51 +0000 (25 12:28 +0200)
treea631e6ec102b75ec6672baa442b744a51880cc20
parente72c5a6239444017dc39cbdabfecfca90f309a6e
Fix 'clone' failure at DOS root directory.

Cloning via relative path fails for a project residing immediately under
the root directory of a DOS drive.  For instance, for project c:/foo,
issuing "cd c:/" followed by "git clone foo bar" fails with error
"Unable to find remote helper for 'c'".  The problem is caused by
make_nonrelative_path() incorrectly returning c://foo rather than
c:/foo for input "foo".  The bogus path c://foo is misinterpreted by
transport_get() as a URL with unrecognized protocol "c", hence the
missing remote helper error.  Fix make_nonrelative_path() to return
c:/foo rather than c://foo (and /foo rather than //foo on Unix).

Resolves msysgit issue #501:
http://code.google.com/p/msysgit/issues/detail?id=501

Signed-off-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
abspath.c