git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Cygwin Git with Windows paths
@ 2018-11-18 15:21 Steven Penny
  2018-11-18 15:41 ` Torsten Bögershausen
                   ` (6 more replies)
  0 siblings, 7 replies; 56+ messages in thread
From: Steven Penny @ 2018-11-18 15:21 UTC (permalink / raw)
  To: git

Cygwin programs can handle Unix form paths:

    $ ls /var
    cache  lib  log  run  tmp

and also Windows form paths:

    $ ls 'C:\cygwin64\var'
    cache  lib  log  run  tmp

However current Cygwin Git cannot:

    $ git clone git://github.com/benhoyt/goawk 'C:\cygwin64\tmp\goawk'
    Cloning into 'C:\cygwin64\tmp\goawk'...
    fatal: Invalid path '/home/Steven/C:\cygwin64\tmp\goawk': No such file or
    directory

It seems the problem is that Git thinks the Windows form path is relative
because it does not start with "/". A Git Bisect reveals this:

05b458c104708141d2fad211d79703b3b99cc5a8 is the first bad commit
commit 05b458c104708141d2fad211d79703b3b99cc5a8
Author: Brandon Williams <bmwill@google.com>
Date:   Mon Dec 12 10:16:52 2016 -0800

    real_path: resolve symlinks by hand

    The current implementation of real_path uses chdir() in order to resolve
    symlinks.  Unfortunately this isn't thread-safe as chdir() affects a
    process as a whole and not just an individual thread.  Instead perform
    the symlink resolution by hand so that the calls to chdir() can be
    removed, making real_path one step closer to being reentrant.

    Signed-off-by: Brandon Williams <bmwill@google.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>

This causes problems for any non-Cygwin tools that might call Git:

http://github.com/golang/go/issues/23155


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

end of thread, other threads:[~2019-05-02  7:49 UTC | newest]

Thread overview: 56+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-18 15:21 Cygwin Git with Windows paths Steven Penny
2018-11-18 15:41 ` Torsten Bögershausen
2018-11-18 16:23   ` Steven Penny
2018-11-18 17:15     ` Torsten Bögershausen
2018-11-18 17:34       ` Steven Penny
2018-11-18 18:28         ` Torsten Bögershausen
2018-11-18 19:00           ` Steven Penny
2018-11-19  0:06       ` Junio C Hamano
2018-11-19  2:11         ` Randall S. Becker
2018-11-19  3:33           ` Junio C Hamano
2018-11-19  5:20             ` Torsten Bögershausen
2018-11-20  0:17               ` Steven Penny
2018-11-20 10:36                 ` Torsten Bögershausen
2018-11-20 12:51                   ` Steven Penny
2018-11-19 12:22             ` Randall S. Becker
2018-11-26 17:32 ` [PATCH v1/RFC 1/1] 'git clone <url> C:\cygwin\home\USER\repo' is working (again) tboegi
2018-11-27  0:35   ` Steven Penny
2018-11-27  1:16   ` Junio C Hamano
2018-11-27  2:49     ` Steven Penny
2018-11-27  5:23       ` Junio C Hamano
2018-11-27  6:20         ` Steven Penny
2018-11-27 12:55         ` Johannes Schindelin
2018-11-28  4:10           ` Junio C Hamano
2018-11-28  5:55             ` J.H. van de Water
2018-11-28  8:46               ` Johannes Schindelin
2018-11-28  9:01                 ` Houder
2018-11-28  9:35                   ` Johannes Schindelin
2018-11-27 20:10     ` Achim Gratz
2018-11-27 12:49   ` Johannes Schindelin
2018-11-28  4:12     ` Junio C Hamano
2018-11-27 20:05   ` Achim Gratz
2018-12-07 17:04 ` [PATCH v2 1/3] git " tboegi
2018-12-07 21:53   ` Johannes Schindelin
2018-12-08  0:49   ` Steven Penny
2018-12-10  8:46     ` Johannes Schindelin
2018-12-10 12:45       ` Steven Penny
2018-12-11 13:39         ` Johannes Schindelin
2018-12-12  0:42           ` Steven Penny
2018-12-12  7:29             ` Johannes Sixt
2018-12-12 12:40               ` Steven Penny
2018-12-13  3:52                 ` Junio C Hamano
2018-12-12 13:33               ` Johannes Schindelin
2018-12-12  3:47     ` Elijah Newren
2018-12-12 13:57       ` Johannes Schindelin
2018-12-07 17:04 ` [PATCH v2 2/3] offset_1st_component(), dos_drive_prefix() return size_t tboegi
2018-12-07 17:05 ` [PATCH v2 3/3] Refactor mingw_cygwin_offset_1st_component() tboegi
2018-12-07 22:18   ` Johannes Schindelin
2018-12-08 15:11 ` [PATCH v3 1/1] git clone <url> C:\cygwin\home\USER\repo' is working (again) tboegi
2018-12-08 16:24   ` Steven Penny
2018-12-09  1:39   ` Junio C Hamano
2018-12-10  8:32   ` Johannes Schindelin
2018-12-11  6:12     ` Torsten Bögershausen
2018-12-11 13:28       ` Johannes Schindelin
2018-12-11 18:55         ` Torsten Bögershausen
2018-12-15  4:33 ` [PATCH v4 " tboegi
2019-05-02  7:48   ` Achim Gratz

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