From: Thomas Rast <trast@student.ethz.ch>
To: Sverre Rabbelier <srabbelier@gmail.com>
Cc: Johannes Sixt <j6t@kdbg.org>, Junio C Hamano <gitster@pobox.com>,
Robin Rosenberg <robin.rosenberg@dewire.com>,
<git@vger.kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH] Handle double slashes in make_relative_path()
Date: Sun, 24 Jan 2010 14:57:42 +0100 [thread overview]
Message-ID: <201001241457.43297.trast@student.ethz.ch> (raw)
In-Reply-To: <fabb9a1e1001231301o149bb13es236a7150f57ce161@mail.gmail.com>
On Saturday 23 January 2010 22:01:38 Sverre Rabbelier wrote:
> Heya,
>
> On Sat, Jan 23, 2010 at 21:41, Johannes Sixt <j6t@kdbg.org> wrote:
>
> > OTOH, it can be worked around easily by the user (just insert the drive
> > prefix). Dunno...
>
> I think it's preferable to keep the old behavior where we fail if the
> user gives us an invalid argument, rather than fix a user error and
> break on a a valid argument instead. I think we should be correct
> first, and try and fix incorrect user behavior after.
I can't really comment on the Windows side of things, but I tried to
come up with some more data points.
POSIX specifies that multiple slashes must be treated as if they were
a single slash (except as in the next bullet point). Leading _double_
slashes may be treated implementation-dependently. [1] Non-leading
double slashes do not seem to be specified.
There's a manpage path_resolution(7) on my system, which can also be
found on the web quite easily, e.g. [2]. It doesn't say anything
about multiple slashes, but experimentally my Linux resolves them as
if they were single slashes (even a leading double slash).
Junio's patch is already in maint, so I suppose we're in the somewhat
unfortunate situation where the old version didn't work in all cases
on Linux, but the current one breaks on Windows in some cases. Then
again, shouldn't windows get special support to figure out that /c/foo
[3] is a prefix of /foo and vice versa, assuming you're currently in
C:?
[1] http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap04.html#tag_04_11
Actually the server doesn't work for me, but google has a cached copy:
http://209.85.129.132/search?q=cache:QUuajH7Dp5gJ:www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap04.html+http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap04.html#tag_04_11&cd=1&hl=en&ct=clnk&gl=uk
[2] http://www.kernel.org/doc/man-pages/online/pages/man7/path_resolution.7.html
[3] Don't blame me if I didn't get that syntax right, I'm actively
trying to forget I ever used Windows and it shows.
--
Thomas Rast
trast@{inf,student}.ethz.ch
next prev parent reply other threads:[~2010-01-24 13:58 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-22 0:07 [PATCH] Handle double slashes in make_relative_path() Thomas Rast
2010-01-22 1:40 ` Junio C Hamano
2010-01-22 3:05 ` Junio C Hamano
2010-01-22 8:36 ` Johannes Sixt
2010-01-23 11:40 ` Robin Rosenberg
2010-01-23 13:09 ` Johannes Sixt
2010-01-23 13:48 ` Robin Rosenberg
2010-01-23 19:00 ` Johannes Sixt
2010-01-23 20:04 ` Junio C Hamano
2010-01-23 20:14 ` Junio C Hamano
2010-01-23 20:41 ` Johannes Sixt
2010-01-23 21:01 ` Sverre Rabbelier
2010-01-24 13:57 ` Thomas Rast [this message]
2010-01-24 19:04 ` Bernhard R. Link
2010-01-24 20:05 ` Junio C Hamano
2010-01-24 16:44 ` Johannes Sixt
2010-01-24 18:31 ` Junio C Hamano
2010-01-25 1:06 ` Robin Rosenberg
2010-01-22 21:11 ` Thomas Rast
2010-01-22 23:35 ` Junio C Hamano
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=201001241457.43297.trast@student.ethz.ch \
--to=trast@student.ethz.ch \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j6t@kdbg.org \
--cc=robin.rosenberg@dewire.com \
--cc=srabbelier@gmail.com \
--cc=torvalds@linux-foundation.org \
/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).