git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: Stefan Beller <sbeller@google.com>,
	"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: What's cooking in git.git (Oct 2016, #03; Tue, 11)
Date: Sun, 16 Oct 2016 10:31:45 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1610151020480.197091@virtualbox> (raw)
In-Reply-To: <xmqqzim6zzc7.fsf@gitster.mtv.corp.google.com>

Hi Junio,

On Fri, 14 Oct 2016, Junio C Hamano wrote:

> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
> >> >> * sb/submodule-ignore-trailing-slash (2016-10-10) 2 commits
> >> >>   (merged to 'next' on 2016-10-11 at e37425ed17)
> >> >>  + submodule: ignore trailing slash in relative url
> >> >>  + submodule: ignore trailing slash on superproject URL
> >> >>
> >> >>  A minor regression fix for "git submodule".
> >> >>
> >> >>  Will merge to 'master'.
> >> >
> >> > Going by the bug report, this *may* be more than
> >> > minor and worth merging down to maint as well, eventually.
> >> 
> >> The topic was forked at a reasonably old commit so that it can be
> >> merged as far down to maint-2.9 if we wanted to.  Which means the
> >> regression was fairly old and fix is not all that urgent as well.
> >
> > And if you merge it to `master` and `maint`,...
> 
> I'll mark it as "wait for follow-up fix" in whats-cooking.txt (on
> 'todo' branch) to remind myself not to merge it yet.

May I request your guidance as to your preference how to proceed? Here is
the problem: Stefan's fix uncovered a bug in the way Git for Windows' Bash
hands off "Unix" paths to real Windows programs, such as `git
submodule-helper`: trailing `/.` gets truncated to `/`.

That is, when passing `/c/test/.` to the helper, what arrives is
actually `C:/test/`. So the helper, being expected to cut off trailing
slashes, cuts it off because it does not see the dot.

Note: when passing URLs (`https://repos.com/mine/.`) or when passing
Windows paths (`C:/test/.`), the helper *will* see the dot, and all is
fine.

Unfortunately the behavior of the MSYS2 Bash cannot be altered in that
respect because existing build workflows *depend* on the current behavior.

Please note we did not have that problem previously, as the helper was a
shell script and therefore stayed in the POSIX-emulated realm, no
POSIX->Windows path translation necessary.

Now, we have two tests in t0060 that try to catch changes in this
particular scenario, verifying that only the dots are cut off of paths
like `/a/b/c/.`.

Given that we cannot modify MSYS2 to appease those tests (because we would
break many more important things), and given that you can easily work
around this by using paths native to Windows when using Git interactively
(which the tests cannot do because they target Linux), I am inclined to
change the tests.

Here are the options I see:

A) remove the tests in question

B) mark them as !MINGW instead

C) change just those two tests from using `$PWD` (pseudo-Unix path) to
  `$(pwd)` (native path)

I would like to hear your feedback about your preference, but not without
priming you a little bit by detailing my current opinion on the matter:

While I think B) would be the easiest to read, C) would document the
expected behavior better. A) would feel to me like shrugging, i.e. the
lazy, wrong thing to do.

What do you think?
Dscho

  reply	other threads:[~2016-10-16  8:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-11 21:06 What's cooking in git.git (Oct 2016, #03; Tue, 11) Junio C Hamano
2016-10-11 21:39 ` Stefan Beller
2016-10-11 21:39   ` Stefan Beller
2016-10-11 21:45   ` Junio C Hamano
2016-10-13 12:40     ` Johannes Schindelin
2016-10-14 16:10       ` Junio C Hamano
2016-10-16  8:31         ` Johannes Schindelin [this message]
2016-10-17 17:03           ` Junio C Hamano
2016-10-18 11:33             ` Johannes Schindelin
2016-10-18 13:35 ` Santiago Torres
2016-10-18 15:53   ` Junio C Hamano
2016-10-19  9:23     ` Jeff King

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.20.1610151020480.197091@virtualbox \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=sbeller@google.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.
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).