From: Junio C Hamano <gitster@pobox.com>
To: Stefan Beller <sbeller@google.com>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
"git\@vger.kernel.org" <git@vger.kernel.org>,
"Karl A." <venv21@gmail.com>,
Dennis Kaarsemaker <dennis@kaarsemaker.net>
Subject: Re: [PATCH 1/2] submodule: ignore trailing slash on superproject URL
Date: Mon, 17 Oct 2016 11:28:42 -0700 [thread overview]
Message-ID: <xmqqh98avnhh.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <CAGZ79kYW2qK1GKxoKy_mkVkjjqEUzkh5aPSzDEfRd6U=PYDdzw@mail.gmail.com> (Stefan Beller's message of "Mon, 17 Oct 2016 10:58:59 -0700")
Stefan Beller <sbeller@google.com> writes:
>> In any case, I find it more disturbing that we somehow ended up with
>> a system where these three things are expected to behave differently:
>>
>> A - path/to/dir
>> B - path/to/dir/
>> C - path/to/dir/.
>>
>> Is that something we can fix?
>
> Well A, B are the same.
> C is "obviously" different, when it comes to counting slashes for relative
> path/url purposes, in the way that there are characters after the last slash
> and just by coincidence '.' refers to the directory itself, C behaving like
> 'path/to/dir/sub' seems right to me.
It doesn't look right to me at all. If you were contrasting
cd path/to/dir/sub && cd ..
cd path/to/dir/bus && cd ..
then I would understand, but why should these two
cd path/to/dir/. && cd ..
cd path/to/dir/sub && cd ..
behave the same?
> So how do you imagine this fix going forward?
> * Breaking existing users with /. at the end? by treating it the same as A,B
> * Do some check based on time/version of Git and cover the old data?
> * Forbid /. at the end from now on?
Where at the end-user facing level does this trailing "/." surface
and how does the difference appear to them? I think that is the
crucial question.
Unless there is some convincing argument why "." is not special
(i.e. counter-argument to the above "bus vs sub" and ". vs sub"
example), I would think "existing users with /." does not matter.
If they are "relying" on the behaviour, I would think it is not
because they find that behaviour intuitive, but only because they
learned to live with it. IOW, treating all of A/B/C the same way
would appear to them a strict bugfix, I would think.
It is totally a different matter if OUR code that consumes the
output from the submodule-helper --resolve-relative" internally is
confused and relies on "../. relative to path/to/dir/. is the same
as ../. relative to path/to/dir/sub" for whatever reason. Without
fixing that, I would not surprised if fixing things to treat A/B/C
the same way would surface differences in the end-user observable
behaviour in a negative way.
next prev parent reply other threads:[~2016-10-17 18:28 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-10 17:56 [PATCH 1/2] submodule: ignore trailing slash on superproject URL Stefan Beller
2016-10-10 17:56 ` [PATCH 2/2] submodule: ignore trailing slash in relative url Stefan Beller
2016-10-10 19:58 ` [PATCH 1/2] submodule: ignore trailing slash on superproject URL Dennis Kaarsemaker
2016-10-12 13:30 ` Johannes Schindelin
2016-10-12 17:06 ` Stefan Beller
2016-10-13 11:11 ` Johannes Schindelin
2016-10-17 7:10 ` Junio C Hamano
2016-10-17 17:58 ` Stefan Beller
2016-10-17 18:28 ` Junio C Hamano [this message]
2016-10-17 18:58 ` Stefan Beller
2016-10-17 19:16 ` Junio C Hamano
2016-10-17 19:32 ` Johannes Sixt
2016-10-17 20:07 ` Junio C Hamano
2016-10-18 20:06 ` Johannes Sixt
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=xmqqh98avnhh.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=dennis@kaarsemaker.net \
--cc=git@vger.kernel.org \
--cc=sbeller@google.com \
--cc=venv21@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.