From: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
To: Junio C Hamano <gitster@pobox.com>
Cc: Steven Penny <svnpenn@gmail.com>,
git@vger.kernel.org, Johannes Sixt <j.sixt@viscovery.net>
Subject: Re: [PATCH 2/2] git-sh-setup: work around Cygwin path handling gotchas
Date: Thu, 24 May 2012 19:27:53 +0100 [thread overview]
Message-ID: <4FBE7DA9.8040309@ramsay1.demon.co.uk> (raw)
In-Reply-To: <7vaa116ulx.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
> Ramsay Jones <ramsay@ramsay1.demon.co.uk> writes:
>
>> However, you could imagine adding code to accommodate external windows
>> programs. If we limit ourselves to the text editor, for example, I could
>> imagine something like the diff attached below to fix up the C based git
>> programs. (You would need to make similar changes to the shell and perl
>> scripts which launch the text editor).
>
> If you _only_ allow editors that understands windows style paths, your
> patch may make sense, but doesn't it break editors that wants only POSIX
> style paths?
Yes.
(If it wasn't clear, I included the code to show what I *didn't* want to see!).
Cygwin built text editors will, of course, work fine with POSIX paths, but
may also work with win32 paths as well. For example, vim supports win32 paths
just fine (it's the *only* editor I tested).
I would not be surprised if vim is not alone in that; I think it mainly depends
on whether the editor attempts to "interpret" the parameter, or simply treats it
as an opaque token to be passed straight to [f]open() [1].
Equally, I suspect some cygwin built editors will fail miserably (maybe they try
to interpret the parameter as an scp-like url, say). I don't know and I'm not
about to test every cygwin text editor to find out!
So, in my opinion, adding code to explicitly support win32 paths, while possible,
is likely to open up a can-o-worms (even if this support were opt-in via config).
I would prefer that we don't go there. :-D
ATB,
Ramsay Jones
[1] Which is why git already supports win32 paths to a certain degree. For example,
the following will work as expected:
$ git config --global core.excludesfile 'C:/cygwin/home/ramsay/.gitignore'
(ie git will read and use the given .gitignore file without problem)
next prev parent reply other threads:[~2012-05-24 18:30 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-06 4:24 Git commit path vs rebase path Steven Penny
2012-05-07 17:27 ` Junio C Hamano
2012-05-08 6:22 ` Johannes Sixt
2012-05-08 6:44 ` Steven Penny
2012-05-08 7:06 ` Johannes Sixt
2012-05-08 7:11 ` Steven Penny
2012-05-08 17:02 ` Junio C Hamano
2012-05-08 17:25 ` Junio C Hamano
2012-05-08 22:47 ` Steven Penny
2012-05-09 21:54 ` Junio C Hamano
2012-05-09 23:14 ` Steven Penny
2012-05-10 18:10 ` Ramsay Jones
2012-05-11 4:35 ` Steven Penny
2012-05-13 22:58 ` Ramsay Jones
2012-05-13 23:42 ` Steven Penny
2012-05-14 6:02 ` Johannes Sixt
2012-05-15 17:32 ` Ramsay Jones
2012-05-16 5:52 ` Johannes Sixt
2012-05-17 18:30 ` Ramsay Jones
2012-05-17 19:19 ` Junio C Hamano
2012-05-16 18:00 ` [PATCH 0/2] " Junio C Hamano
2012-05-16 18:00 ` [PATCH 1/2] git-sh-setup: define workaround wrappers before they are used Junio C Hamano
2012-05-17 22:36 ` Ramsay Jones
2012-05-16 18:00 ` [PATCH 2/2] git-sh-setup: work around Cygwin path handling gotchas Junio C Hamano
2012-05-16 18:51 ` Steven Penny
2012-05-16 19:02 ` Junio C Hamano
2012-05-17 23:15 ` Ramsay Jones
2012-05-18 2:34 ` Junio C Hamano
2012-05-19 0:43 ` Steven Penny
2012-05-21 18:43 ` Ramsay Jones
2012-05-21 22:24 ` Junio C Hamano
2012-05-24 18:27 ` Ramsay Jones [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-05-21 23:51 Matt Seitz (matseitz)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FBE7DA9.8040309@ramsay1.demon.co.uk \
--to=ramsay@ramsay1.demon.co.uk \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j.sixt@viscovery.net \
--cc=svnpenn@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).