From: Junio C Hamano <gitster@pobox.com>
To: Johannes Schindelin <johannes.schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] t/Makefile: make sure that file names are truly platform-independent
Date: Mon, 15 Aug 2016 09:06:35 -0700 [thread overview]
Message-ID: <xmqqk2fihv90.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <814aefbcf0f9380098e3f7a183399e11e24180dd.1471270061.git.johannes.schindelin@gmx.de> (Johannes Schindelin's message of "Mon, 15 Aug 2016 16:08:41 +0200 (CEST)")
Johannes Schindelin <johannes.schindelin@gmx.de> writes:
> Some file names that are okay on ext4 and on HFS+ are illegal in
> Windows. In order to stay truly platform-independent, Git's source code
> must not contain such illegal file names, even if things just happen to
> work on Linux.
Good thinking.
Some tests may have to be skipped on platforms that cannot express
certain paths, but even then they shouldn't ship a file with
pathname that cannot even be checked out (they should instead create
and use such a path, protected behind filesystem specific test
prerequisite).
> +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?
master$ git ls-files '*["*:<>?\\|]*'
pu$ git ls-files '*["*:<>?\\|]*'
t/t4013/diff.diff_--diff-line-prefix=-->_master_master^_side
Thanks.
> + test -z "$$illegal" || { \
> + echo >&2 "illegal file name(s): " $$illegal; exit 1; }
[Reference]
*1* http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap06.html#tag_06_01
next prev parent reply other threads:[~2016-08-15 16:06 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 [this message]
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
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=xmqqk2fihv90.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=johannes.schindelin@gmx.de \
/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.