From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] t/Makefile: make sure that file names are truly platform-independent
Date: Tue, 16 Aug 2016 10:42:19 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.20.1608161035320.4924@virtualbox> (raw)
In-Reply-To: <alpine.DEB.2.20.1608161026110.4924@virtualbox>
[-- Attachment #1: Type: text/plain, Size: 1565 bytes --]
Hi Junio,
On Tue, 16 Aug 2016, Johannes Schindelin wrote:
> On Mon, 15 Aug 2016, Junio C Hamano wrote:
>
> > Junio C Hamano <gitster@pobox.com> writes:
> >
> > >> +test-lint-filenames:
> > >> + @illegal="$$(git ls-files | grep '["*:<>?\\|]')"; \
> > >
> > > This pattern must exclude questionables on either NTFS or HFS+; it
> > > is ironic that it is not even sufficient to limit ourselves to the
> > > Portable Character Set [*1*], but such is life.
> > >
> > > By the way, doesn't ls-files take pathspec glob, saving one extra
> > > process to run grep?
>
> I specifically did not do that, sorry for omitting the rationale from the
> commit message. The reason why I have that grep is so that the backslash
> can also catch non-ASCII characters, such as "Hellö-Jüniö".
And there is another very good reason to keep the grep: the problem I just
reported is *caused* by your avoiding the grep call.
In my tests, at least, `git ls-files '*\*' lists *all* files in
subdirectories. In other words, it matches the *forward* slash. This also
happens when I run the command in cmd.exe instead of Git Bash, meaning
that it is *not* caused by some MSYS2 path conversion from pseudo-Unix to
Windows paths. That only leaves the conclusion that some of our pathspec
code tries to be helpful and takes a backslash for a directory separator.
In light of these problems, and also in light of the fact that the
test-lint-filenames code is hardly performance critical, I am strongly in
favor of reverting to using grep.
Ciao,
Dscho
next prev parent reply other threads:[~2016-08-16 8:42 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-15 14:08 [PATCH] t/Makefile: make sure that file names are truly platform-independent Johannes Schindelin
2016-08-15 16:06 ` Junio C Hamano
2016-08-15 16:57 ` Junio C Hamano
2016-08-15 18:43 ` Jeff King
2016-08-16 13:10 ` Johannes Schindelin
2016-08-16 14:55 ` Jeff King
2016-08-16 15:37 ` Johannes Schindelin
2016-08-16 15:39 ` Jeff King
2016-08-15 21:03 ` Junio C Hamano
2016-08-16 8:29 ` Johannes Schindelin
2016-08-16 8:42 ` Johannes Schindelin [this message]
2016-08-16 9:53 ` Junio C Hamano
2016-08-16 10:07 ` Junio C Hamano
2016-08-16 15:10 ` Johannes Schindelin
2016-08-16 21:10 ` Johannes Sixt
2016-08-16 8:50 ` [PATCH v2] t/Makefile: make sure that paths can be checked out on platforms we care Johannes Schindelin
2016-08-16 15:13 ` [PATCH v3] t/Makefile: ensure that paths are valid " Johannes Schindelin
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=alpine.DEB.2.20.1608161035320.4924@virtualbox \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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).