{"thread":{"id":"43853","subject":"[PATCH] t/Makefile: make sure that file names are truly platform-independent","startedAt":"2016-08-15T14:10:40Z","lastAt":"2016-08-16T21:10:45Z","messageCount":17,"participants":["Johannes Schindelin","Junio C Hamano","Jeff King","Johannes Sixt"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"299346","messageId":"814aefbcf0f9380098e3f7a183399e11e24180dd.1471270061.git.johannes.schindelin@gmx.de","threadId":"43853","inReplyTo":null,"subject":"[PATCH] t/Makefile: make sure that file names are truly platform-independent","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-08-15T14:08:41Z","receivedAt":"2016-08-15T14:10:40Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Some file names that are okay on ext4 and on HFS+ are illegal in\nWindows. In order to stay truly platform-independent, Git's source code\nmust not contain such illegal file names, even if things just happen to\nwork on Linux.\n\nOne such file name was recently introduced into Git's `pu` branch:\n\nt4013/diff.diff_--diff-line-prefix=-->_master_master^_sidt4013/diff.diff_--diff-line-prefix=-->_master_master^_sid\n\nIt is illegal because it contains the '>' character that is not part of\na valid filename on Windows.\n\nTo catch these issues early, let's introduce a new test-lint-* goal that\nfails if such file names were detected and run it as part of a `make\ntest`.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\nPublished-As: https://github.com/dscho/git/releases/tag/test-lint-filenames-v1\nFetch-It-Via: git fetch https://github.com/dscho/git test-lint-filenames-v1\n\n\tThis is the more complete fix I talked about.\n\n t/Makefile | 8 +++++++-\n 1 file changed, 7 insertions(+), 1 deletion(-)\n\ndiff --git a/t/Makefile b/t/Makefile\nindex 18e2b28..3c0eb48 100644\n--- a/t/Makefile\n+++ b/t/Makefile\n@@ -52,7 +52,8 @@ clean-except-prove-cache:\n clean: clean-except-prove-cache\n \t$(RM) .prove\n \n-test-lint: test-lint-duplicates test-lint-executable test-lint-shell-syntax\n+test-lint: test-lint-duplicates test-lint-executable test-lint-shell-syntax \\\n+\ttest-lint-filenames\n \n test-lint-duplicates:\n \t@dups=`echo $(T) | tr ' ' '\\n' | sed 's/-.*//' | sort | uniq -d` && \\\n@@ -67,6 +68,11 @@ test-lint-executable:\n test-lint-shell-syntax:\n \t@'$(PERL_PATH_SQ)' check-non-portable-shell.pl $(T) $(THELPERS)\n \n+test-lint-filenames:\n+\t@illegal=\"$$(git ls-files | grep '[\"*:<>?\\\\|]')\"; \\\n+\t\ttest -z \"$$illegal\" || { \\\n+\t\techo >&2 \"illegal file name(s): \" $$illegal; exit 1; }\n+\n aggregate-results-and-cleanup: $(T)\n \t$(MAKE) aggregate-results\n \t$(MAKE) clean\n-- \n2.9.2.691.g78954f3\n\nbase-commit: 5e18482599a6cfeb8d4e0ee5a98d30220cbdff72\n"},{"id":"299353","messageId":"xmqqk2fihv90.fsf@gitster.mtv.corp.google.com","threadId":"43853","inReplyTo":"814aefbcf0f9380098e3f7a183399e11e24180dd.1471270061.git.johannes.schindelin@gmx.de","subject":"Re: [PATCH] t/Makefile: make sure that file names are truly platform-independent","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-08-15T16:06:35Z","receivedAt":"2016-08-15T16:06:45Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <johannes.schindelin@gmx.de> writes:\n\n> Some file names that are okay on ext4 and on HFS+ are illegal in\n> Windows. In order to stay truly platform-independent, Git's source code\n> must not contain such illegal file names, even if things just happen to\n> work on Linux.\n\nGood thinking.\n\nSome tests may have to be skipped on platforms that cannot express\ncertain paths, but even then they shouldn't ship a file with\npathname that cannot even be checked out (they should instead create\nand use such a path, protected behind filesystem specific test\nprerequisite).\n\n> +test-lint-filenames:\n> +\t@illegal=\"$$(git ls-files | grep '[\"*:<>?\\\\|]')\"; \\\n\nThis pattern must exclude questionables on either NTFS or HFS+; it\nis ironic that it is not even sufficient to limit ourselves to the\nPortable Character Set [*1*], but such is life.\n\nBy the way, doesn't ls-files take pathspec glob, saving one extra\nprocess to run grep?\n\n    master$ git ls-files '*[\"*:<>?\\\\|]*'\n    pu$ git ls-files '*[\"*:<>?\\\\|]*'\n    t/t4013/diff.diff_--diff-line-prefix=-->_master_master^_side\n\nThanks.\n\n> +\t\ttest -z \"$$illegal\" || { \\\n> +\t\techo >&2 \"illegal file name(s): \" $$illegal; exit 1; }\n\n[Reference]\n\n*1* http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap06.html#tag_06_01\n"},{"id":"299359","messageId":"xmqq4m6mhsvj.fsf@gitster.mtv.corp.google.com","threadId":"43853","inReplyTo":"xmqqk2fihv90.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH] t/Makefile: make sure that file names are truly platform-independent","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-08-15T16:57:52Z","receivedAt":"2016-08-15T16:58:02Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Johannes Schindelin <johannes.schindelin@gmx.de> writes:\n>\n>> Some file names that are okay on ext4 and on HFS+ are illegal in\n>> Windows. In order to stay truly platform-independent, Git's source code\n>> must not contain such illegal file names, even if things just happen to\n>> work on Linux.\n>\n> Good thinking.\n>\n> Some tests may have to be skipped on platforms that cannot express\n> certain paths, but even then they shouldn't ship a file with\n> pathname that cannot even be checked out (they should instead create\n> and use such a path, protected behind filesystem specific test\n> prerequisite).\n\nThis is a tangent.\n\nAdding a check target in t/Makefile is a good first step, but any\ntree of a project that gets participation from those on different\nplatforms must allow any supported platforms to check it out.  The\nissue is not limited to the t/ hierarchy, but the whole thing.  I\ndo not mean to say this patch needs to do more than checking t/ at\nall, by the way.  After all, people send patches without running\ntest-lint so this only means that we as the project must be careful.\n\nI wonder if we already have a good mechanism to allow a project and\nits participants (say, \"me\") to declare \"in this project, pathnames\nmust conform to this rule\" and help them avoid creating a tree that\nviolates the rule customized to their project.\n\nI guess \"write_index_as_tree()\" would be one of the central places\nto hook into and that covers an individual contributor or a patch\napplier who ends up adding offending paths to the project, as well\nas a merge made in response to a pull request (unless it is a\nfast-forward) [*1*].  The pre-receive hook can also be used to\ninspect and reject an attempt to push an offending tree into the\nhistory.\n\nSuch a mechanism would allow a project that wants participation by\nfolks with case insensitive filesystems to ensure that they do not\ncreate a directory that has both xt_TCPMSS.h and xt_tcpmss.h at the\nsame time, for example, but the mechanism needs to allow visibility\ninto more than just a single path when the custom check is made\n(e.g. a hook run in \"write_index_as_tree()\" can see all entries in\nthe index to make the decision; if we were to also hook into\n\"add_to_index()\", the hook must be able to see other entries in the\nindex to which the new entry is being added).\n\n\n[Footnote]\n\n*1* \"add_to_index()\" could be another place to hook into, and doing\nso has the merit of catching a breakage sooner, but I suspect that\nalone may not be sufficient if there are other ways for new entries\nto appear in the index.\n"},{"id":"299372","messageId":"20160815184315.cyhln2bxg465lq2l@sigill.intra.peff.net","threadId":"43853","inReplyTo":"xmqq4m6mhsvj.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH] t/Makefile: make sure that file names are truly platform-independent","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2016-08-15T18:43:15Z","receivedAt":"2016-08-15T18:43:23Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Aug 15, 2016 at 09:57:52AM -0700, Junio C Hamano wrote:\n\n> I wonder if we already have a good mechanism to allow a project and\n> its participants (say, \"me\") to declare \"in this project, pathnames\n> must conform to this rule\" and help them avoid creating a tree that\n> violates the rule customized to their project.\n> \n> I guess \"write_index_as_tree()\" would be one of the central places\n> to hook into and that covers an individual contributor or a patch\n> applier who ends up adding offending paths to the project, as well\n> as a merge made in response to a pull request (unless it is a\n> fast-forward) [*1*].  The pre-receive hook can also be used to\n> inspect and reject an attempt to push an offending tree into the\n> history.\n> \n> Such a mechanism would allow a project that wants participation by\n> folks with case insensitive filesystems to ensure that they do not\n> create a directory that has both xt_TCPMSS.h and xt_tcpmss.h at the\n> same time, for example, but the mechanism needs to allow visibility\n> into more than just a single path when the custom check is made\n> (e.g. a hook run in \"write_index_as_tree()\" can see all entries in\n> the index to make the decision; if we were to also hook into\n> \"add_to_index()\", the hook must be able to see other entries in the\n> index to which the new entry is being added).\n\nI am not convinced this mechanism needs to be built into git. Because it\nhappens to be about filenames, git at least has a hope of making sense\nof the various project rules.\n\nBut conceptually, I don't think this is really any different than \"don't\ncheck in code which does not build on platform X\", or \"do not check in\ncode that does not meet our style guide\". We already have general hooks\nwhere such checks can be made[1], and this could be checked in the same\nplace.\n\nI actually think the whitespace-checking done by diff and apply is in a\nsimilar boat, though it is useful in practice. OTOH, I think primarily\nit is used as a tool to feed information to policy hooks, rather than as\nan enforcement mechanism itself (maybe --whitespace=fix on apply is an\nexception there, though).\n\n-Peff\n\n[1] Obviously we have pre-commit for local enforcement and pre-receive\n    for central enforcement. But people with workflows around CI-style\n    tests would want to be able to fetch, check \"does this meet our\n    policy\", and return a yes/no answer on whether the result is OK to\n    merge.\n"},{"id":"299398","messageId":"xmqqoa4tg2yi.fsf@gitster.mtv.corp.google.com","threadId":"43853","inReplyTo":"xmqqk2fihv90.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH] t/Makefile: make sure that file names are truly platform-independent","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-08-15T21:03:01Z","receivedAt":"2016-08-15T21:03:10Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Good thinking.\n>\n> Some tests may have to be skipped on platforms that cannot express\n> certain paths, but even then they shouldn't ship a file with\n> pathname that cannot even be checked out (they should instead create\n> and use such a path, protected behind filesystem specific test\n> prerequisite).\n>\n>> +test-lint-filenames:\n>> +\t@illegal=\"$$(git ls-files | grep '[\"*:<>?\\\\|]')\"; \\\n>\n> This pattern must exclude questionables on either NTFS or HFS+; it\n> is ironic that it is not even sufficient to limit ourselves to the\n> Portable Character Set [*1*], but such is life.\n>\n> By the way, doesn't ls-files take pathspec glob, saving one extra\n> process to run grep?\n>\n>     master$ git ls-files '*[\"*:<>?\\\\|]*'\n>     pu$ git ls-files '*[\"*:<>?\\\\|]*'\n>     t/t4013/diff.diff_--diff-line-prefix=-->_master_master^_side\n\nOne more thing you may want to exclude is HT.  Here is a suggested\nreroll.  I reworded to avoid a subjective \"truly platform-independent\",\nwhich is not what we intend to aim for anyway (we only try to support\nthe platforms we care about).\n\n-- >8 --\nFrom: Johannes Schindelin <johannes.schindelin@gmx.de>\nDate: Mon, 15 Aug 2016 16:08:41 +0200\nSubject: [PATCH] t/Makefile: make sure that paths can be checked out on\n platforms we care\n\nSome pathnames that are okay on ext4 and on HFS+ cannot be checked\nout on Windows.  Tests that want to see operations on such paths on\nfilesystems that support them must do so behind appropriate test\nprerequisites, and must not include them in the source tree (instead\nthey should create them when they run).  Otherwise, the source tree\ncannot be even checked out.\n\nMake sure that double-quotes, asterisk, colon, greater/less-than,\nquestion-mark, backslash, tab and vertical-bar never appears in the\npathnames with a new test-lint-* target as part of a `make test`.\n\nNoticed when a topic wanted to add a pathname with '>' in it.  A\ncheck like this will prevent a similar problems from happening.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n t/Makefile | 8 +++++++-\n 1 file changed, 7 insertions(+), 1 deletion(-)\n\ndiff --git a/t/Makefile b/t/Makefile\nindex 18e2b28..d4b2a50 100644\n--- a/t/Makefile\n+++ b/t/Makefile\n@@ -52,7 +52,8 @@ clean-except-prove-cache:\n clean: clean-except-prove-cache\n \t$(RM) .prove\n \n-test-lint: test-lint-duplicates test-lint-executable test-lint-shell-syntax\n+test-lint: test-lint-duplicates test-lint-executable test-lint-shell-syntax \\\n+\ttest-lint-filenames\n \n test-lint-duplicates:\n \t@dups=`echo $(T) | tr ' ' '\\n' | sed 's/-.*//' | sort | uniq -d` && \\\n@@ -67,6 +68,11 @@ test-lint-executable:\n test-lint-shell-syntax:\n \t@'$(PERL_PATH_SQ)' check-non-portable-shell.pl $(T) $(THELPERS)\n \n+test-lint-filenames:\n+\t@bad=$$(git ls-files '*[\t\"*:<>?\\\\|]*'); \\\n+\t\ttest -z \"$$bad\" || { \\\n+\t\techo >&2 \"do not use non-portable file name(s): $$bad\"; exit 1; }\n+\n aggregate-results-and-cleanup: $(T)\n \t$(MAKE) aggregate-results\n \t$(MAKE) clean\n-- \n2.10.0-rc0-132-gce76bc9\n\n"},{"id":"299438","messageId":"alpine.DEB.2.20.1608161026110.4924@virtualbox","threadId":"43853","inReplyTo":"xmqqoa4tg2yi.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH] t/Makefile: make sure that file names are truly platform-independent","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-08-16T08:29:54Z","receivedAt":"2016-08-16T08:30:14Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Mon, 15 Aug 2016, Junio C Hamano wrote:\n\n> Junio C Hamano <gitster@pobox.com> writes:\n> \n> >> +test-lint-filenames:\n> >> +\t@illegal=\"$$(git ls-files | grep '[\"*:<>?\\\\|]')\"; \\\n> >\n> > This pattern must exclude questionables on either NTFS or HFS+; it\n> > is ironic that it is not even sufficient to limit ourselves to the\n> > Portable Character Set [*1*], but such is life.\n> >\n> > By the way, doesn't ls-files take pathspec glob, saving one extra\n> > process to run grep?\n\nI specifically did not do that, sorry for omitting the rationale from the\ncommit message. The reason why I have that grep is so that the backslash\ncan also catch non-ASCII characters, such as \"Hellö-Jüniö\".\n\n> One more thing you may want to exclude is HT.  Here is a suggested\n> reroll.  I reworded to avoid a subjective \"truly platform-independent\",\n> which is not what we intend to aim for anyway (we only try to support\n> the platforms we care about).\n\nUnfortunately, this version (actually, the version of `pu`, which I\nassume is identical) does not work correctly:\n\n$ make test-lint\ndo not use non-portable file name(s): Git-SVN/00compile.t\nGit-SVN/Utils/add_path_to_url.t\nGit-SVN/Utils/can_compress.t\nGit-SVN/Utils/canonicalize_url.t\nGit-SVN/Utils/collapse_dotdot.t\nGit-SVN/Utils/fatal.t\nGit-SVN/Utils/join_paths.t\ndiff-lib/COPYING\ndiff-lib/README\nhelper/.gitignore\nhelper/test-chmtime.c\nhelper/test-config.c\nhelper/test-ctype.c\nhelper/test-date.c\nhelper/test-delta.c\nhelper/test-dump-cache-tree.c\nhelper/test-dump-split-index.c\nhelper/test-dump-untracked-cache.c\nhelper/test-dump-watchman.c\nhelper/test-fake-ssh.c\nhelper/test-genrandom.c\nhelper/test-hashmap.c\nhelper/test-index-version.c\nhelper/test-line-buffer.c\nhelper/test-match-trees.c\nhelper/test-mergesort.c\nhelper/test-mktemp.c\nhelper/test-parse-options.c\nhelper/test-path-utils.c\nhelper/test-prio-queue.c\nhelper/test-read-cache.c\nhelper/test-regex.c\nhelper/test-revision-walking.c\nhelper/test-run-command.c\nhelper/test-scrap-cache-tree.c\nhelper/test-sha1-array.c\nhelper/test-sha1.c\nhelper/test-sha1.sh\nhelper/test-sigchain.c\nhelper/test-string-list.c\nhelper/test-submodule-config.c\nhelper/test-subprocess.c\nhelper/test-svn-fe.c\nhelper/test-urlmatch-normalization.c\nhelper/test-wildmatch.c\nlib-gpg/keyring.gpg\nlib-gpg/ownertrust\nlib-httpd/apache.conf\nlib-httpd/broken-smart-http.sh\nlib-httpd/error.sh\nlib-httpd/passwd\nlib-httpd/ssl.cnf\nperf/.gitignore\nperf/Makefile\nperf/README\nperf/aggregate.perl\nperf/min_time.perl\nperf/p0000-perf-lib-sanity.sh\nperf/p0001-rev-list.sh\nperf/p0002-read-cache.sh\nperf/p3400-rebase.sh\nperf/p3404-rebase-interactive.sh\nperf/p4000-diff-algorithms.sh\nperf/p4001-diff-no-index.sh\nperf/p4211-line-log.sh\nperf/p5302-pack-index.sh\nperf/p5303-many-packs.sh\nperf/p5310-pack-bitmaps.sh\nperf/p7000-filter-branch.sh\nperf/p7300-clean.sh\nperf/p7810-grep.sh\nperf/perf-lib.sh\nperf/run\nt0110/README\nt0110/url-1\nt0110/url-10\nt0110/url-11\nt0110/url-2\nt0110/url-3\nt0110/url-4\nt0110/url-5\nt0110/url-6\nt0110/url-7\nt0110/url-8\nt0110/url-9\nt0200/test.c\nt0200/test.perl\nt0200/test.sh\nt0202/test.pl\nt1509/excludes\nt1509/prepare-chroot.sh\nt3900/1-UTF-8.txt\nt3900/2-UTF-8.txt\nt3900/ISO-2022-JP.txt\nt3900/ISO8859-1.txt\nt3900/UTF-16.txt\nt3900/eucJP.txt\nt4013/diff.config_format.subjectprefix_DIFFERENT_PREFIX\nt4013/diff.diff-tree_--cc_--patch-with-stat_--summary_master\nt4013/diff.diff-tree_--cc_--patch-with-stat_--summary_side\nt4013/diff.diff-tree_--cc_--patch-with-stat_master\nt4013/diff.diff-tree_--cc_--stat_--summary_master\nt4013/diff.diff-tree_--cc_--stat_--summary_side\nt4013/diff.diff-tree_--cc_--stat_master\nt4013/diff.diff-tree_--cc_master\nt4013/diff.diff-tree_--patch-with-raw_initial\nt4013/diff.diff-tree_--patch-with-stat_initial\nt4013/diff.diff-tree_--pretty=oneline_--patch-with-raw_initial\nt4013/diff.diff-tree_--pretty=oneline_--patch-with-stat_initial\nt4013/diff.diff-tree_--pretty=oneline_--root_--patch-with-raw_initial\nt4013/diff.diff-tree_--pretty=oneline_--root_--patch-with-stat_initial\nt4013/diff.diff-tree_--pretty=oneline_--root_-p_initial\nt4013/diff.diff-tree_--pretty=oneline_--root_initial\nt4013/diff.diff-tree_--pretty=oneline_-p_initial\nt4013/diff.diff-tree_--pretty=oneline_initial\nt4013/diff.diff-tree_--pretty_--patch-with-raw_initial\nt4013/diff.diff-tree_--pretty_--patch-with-stat_initial\nt4013/diff.diff-tree_--pretty_--patch-with-stat_side\nt4013/diff.diff-tree_--pretty_--root_--patch-with-raw_initial\nt4013/diff.diff-tree_--pretty_--root_--patch-with-stat_initial\nt4013/diff.diff-tree_--pretty_--root_--stat_--summary_initial\nt4013/diff.diff-tree_--pretty_--root_--stat_initial\nt4013/diff.diff-tree_--pretty_--root_--summary_-r_initial\nt4013/diff.diff-tree_--pretty_--root_--summary_initial\nt4013/diff.diff-tree_--pretty_--root_-p_initial\nt4013/diff.diff-tree_--pretty_--root_initial\nt4013/diff.diff-tree_--pretty_--stat_--summary_initial\nt4013/diff.diff-tree_--pretty_--stat_initial\nt4013/diff.diff-tree_--pretty_--summary_initial\nt4013/diff.diff-tree_--pretty_-p_initial\nt4013/diff.diff-tree_--pretty_-p_side\nt4013/diff.diff-tree_--pretty_initial\nt4013/diff.diff-tree_--pretty_side\nt4013/diff.diff-tree_--root_--abbrev_initial\nt4013/diff.diff-tree_--root_--patch-with-raw_initial\nt4013/diff.diff-tree_--root_--patch-with-stat_initial\nt4013/diff.diff-tree_--root_-p_initial\nt4013/diff.diff-tree_--root_-r_--abbrev=4_initial\nt4013/diff.diff-tree_--root_-r_--abbrev_initial\nt4013/diff.diff-tree_--root_-r_initial\nt4013/diff.diff-tree_--root_initial\nt4013/diff.diff-tree_-c_--abbrev_master\nt4013/diff.diff-tree_-c_--stat_--summary_master\nt4013/diff.diff-tree_-c_--stat_--summary_side\nt4013/diff.diff-tree_-c_--stat_master\nt4013/diff.diff-tree_-c_master\nt4013/diff.diff-tree_-p_-m_master\nt4013/diff.diff-tree_-p_initial\nt4013/diff.diff-tree_-p_master\nt4013/diff.diff-tree_-r_--abbrev=4_initial\nt4013/diff.diff-tree_-r_--abbrev_initial\nt4013/diff.diff-tree_-r_initial\nt4013/diff.diff-tree_initial\nt4013/diff.diff-tree_master\nt4013/diff.diff_--abbrev_initial..side\nt4013/diff.diff_--cached\nt4013/diff.diff_--cached_--_file0\nt4013/diff.diff_--dirstat-by-file_initial_rearrange\nt4013/diff.diff_--dirstat_initial_rearrange\nt4013/diff.diff_--dirstat_master~1_master~2\nt4013/diff.diff_--name-status_dir2_dir\nt4013/diff.diff_--no-index_--name-status_--_dir2_dir\nt4013/diff.diff_--no-index_--name-status_dir2_dir\nt4013/diff.diff_--no-index_dir_dir3\nt4013/diff.diff_--patch-with-raw_-r_initial..side\nt4013/diff.diff_--patch-with-raw_initial..side\nt4013/diff.diff_--patch-with-stat_-r_initial..side\nt4013/diff.diff_--patch-with-stat_initial..side\nt4013/diff.diff_--stat_initial..side\nt4013/diff.diff_-r_--stat_initial..side\nt4013/diff.diff_-r_initial..side\nt4013/diff.diff_initial..side\nt4013/diff.diff_master_master^_side\nt4013/diff.format-patch_--attach_--stdout_--suffix=.diff_initial..side\nt4013/diff.format-patch_--attach_--stdout_initial..master\nt4013/diff.format-patch_--attach_--stdout_initial..master^\nt4013/diff.format-patch_--attach_--stdout_initial..side\nt4013/diff.format-patch_--inline_--stdout_--numbered-files_initial..master\nt4013/diff.format-patch_--inline_--stdout_--subject-prefix=TESTCASE_initial..master\nt4013/diff.format-patch_--inline_--stdout_initial..master\nt4013/diff.format-patch_--inline_--stdout_initial..master^\nt4013/diff.format-patch_--inline_--stdout_initial..master^^\nt4013/diff.format-patch_--inline_--stdout_initial..side\nt4013/diff.format-patch_--stdout_--cover-letter_-n_initial..master^\nt4013/diff.format-patch_--stdout_--no-numbered_initial..master\nt4013/diff.format-patch_--stdout_--numbered_initial..master\nt4013/diff.format-patch_--stdout_initial..master\nt4013/diff.format-patch_--stdout_initial..master^\nt4013/diff.format-patch_--stdout_initial..side\nt4013/diff.log_--decorate=full_--all\nt4013/diff.log_--decorate_--all\nt4013/diff.log_--patch-with-stat_--summary_master_--_dir_\nt4013/diff.log_--patch-with-stat_master\nt4013/diff.log_--patch-with-stat_master_--_dir_\nt4013/diff.log_--root_--cc_--patch-with-stat_--summary_master\nt4013/diff.log_--root_--patch-with-stat_--summary_master\nt4013/diff.log_--root_--patch-with-stat_master\nt4013/diff.log_--root_-c_--patch-with-stat_--summary_master\nt4013/diff.log_--root_-p_master\nt4013/diff.log_--root_master\nt4013/diff.log_-GF_-p_--pickaxe-all_master\nt4013/diff.log_-GF_-p_master\nt4013/diff.log_-GF_master\nt4013/diff.log_-SF_-p_master\nt4013/diff.log_-SF_master\nt4013/diff.log_-SF_master_--max-count=0\nt4013/diff.log_-SF_master_--max-count=1\nt4013/diff.log_-SF_master_--max-count=2\nt4013/diff.log_-S_F_master\nt4013/diff.log_-m_-p_--first-parent_master\nt4013/diff.log_-m_-p_master\nt4013/diff.log_-p_--first-parent_master\nt4013/diff.log_-p_master\nt4013/diff.log_master\nt4013/diff.rev-list_--children_HEAD\nt4013/diff.rev-list_--parents_HEAD\nt4013/diff.show_--first-parent_master\nt4013/diff.show_--patch-with-raw_side\nt4013/diff.show_--patch-with-stat_--summary_side\nt4013/diff.show_--patch-with-stat_side\nt4013/diff.show_--root_initial\nt4013/diff.show_--stat_--summary_side\nt4013/diff.show_--stat_side\nt4013/diff.show_-c_master\nt4013/diff.show_-m_master\nt4013/diff.show_initial\nt4013/diff.show_master\nt4013/diff.show_side\nt4013/diff.whatchanged_--patch-with-stat_--summary_master_--_dir_\nt4013/diff.whatchanged_--patch-with-stat_master\nt4013/diff.whatchanged_--patch-with-stat_master_--_dir_\nt4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master\nt4013/diff.whatchanged_--root_--patch-with-stat_--summary_master\nt4013/diff.whatchanged_--root_--patch-with-stat_master\nt4013/diff.whatchanged_--root_-c_--patch-with-stat_--summary_master\nt4013/diff.whatchanged_--root_-p_master\nt4013/diff.whatchanged_--root_master\nt4013/diff.whatchanged_-SF_-p_master\nt4013/diff.whatchanged_-SF_master\nt4013/diff.whatchanged_-p_master\nt4013/diff.whatchanged_master\nt4018/README\nt4018/cpp-c++-function\nt4018/cpp-class-constructor\nt4018/cpp-class-constructor-mem-init\nt4018/cpp-class-definition\nt4018/cpp-class-definition-derived\nt4018/cpp-class-destructor\nt4018/cpp-function-returning-global-type\nt4018/cpp-function-returning-nested\nt4018/cpp-function-returning-pointer\nt4018/cpp-function-returning-reference\nt4018/cpp-gnu-style-function\nt4018/cpp-namespace-definition\nt4018/cpp-operator-definition\nt4018/cpp-skip-access-specifiers\nt4018/cpp-skip-comment-block\nt4018/cpp-skip-labels\nt4018/cpp-struct-definition\nt4018/cpp-struct-single-line\nt4018/cpp-template-function-definition\nt4018/cpp-union-definition\nt4018/cpp-void-c-function\nt4018/css-brace-in-col-1\nt4018/css-colon-eol\nt4018/css-colon-selector\nt4018/css-common\nt4018/css-long-selector-list\nt4018/css-prop-sans-indent\nt4018/css-short-selector-list\nt4018/css-trailing-space\nt4018/custom1-pattern\nt4018/custom2-match-to-end-of-line\nt4018/custom3-alternation-in-pattern\nt4018/fountain-scene\nt4018/java-class-member-function\nt4018/perl-skip-end-of-heredoc\nt4018/perl-skip-forward-decl\nt4018/perl-skip-sub-in-pod\nt4018/perl-sub-definition\nt4018/perl-sub-definition-kr-brace\nt4020/diff.NUL\nt4034/ada/expect\nt4034/ada/post\nt4034/ada/pre\nt4034/bibtex/expect\nt4034/bibtex/post\nt4034/bibtex/pre\nt4034/cpp/expect\nt4034/cpp/post\nt4034/cpp/pre\nt4034/csharp/expect\nt4034/csharp/post\nt4034/csharp/pre\nt4034/css/expect\nt4034/css/post\nt4034/css/pre\nt4034/fortran/expect\nt4034/fortran/post\nt4034/fortran/pre\nt4034/html/expect\nt4034/html/post\nt4034/html/pre\nt4034/java/expect\nt4034/java/post\nt4034/java/pre\nt4034/matlab/expect\nt4034/matlab/post\nt4034/matlab/pre\nt4034/objc/expect\nt4034/objc/post\nt4034/objc/pre\nt4034/pascal/expect\nt4034/pascal/post\nt4034/pascal/pre\nt4034/perl/expect\nt4034/perl/post\nt4034/perl/pre\nt4034/php/expect\nt4034/php/post\nt4034/php/pre\nt4034/python/expect\nt4034/python/post\nt4034/python/pre\nt4034/ruby/expect\nt4034/ruby/post\nt4034/ruby/pre\nt4034/tex/expect\nt4034/tex/post\nt4034/tex/pre\nt4051/appended1.c\nt4051/appended2.c\nt4051/dummy.c\nt4051/hello.c\nt4051/includes.c\nt4100/t-apply-1.expect\nt4100/t-apply-1.patch\nt4100/t-apply-2.expect\nt4100/t-apply-2.patch\nt4100/t-apply-3.expect\nt4100/t-apply-3.patch\nt4100/t-apply-4.expect\nt4100/t-apply-4.patch\nt4100/t-apply-5.expect\nt4100/t-apply-5.patch\nt4100/t-apply-6.expect\nt4100/t-apply-6.patch\nt4100/t-apply-7.expect\nt4100/t-apply-7.patch\nt4100/t-apply-8.expect\nt4100/t-apply-8.patch\nt4100/t-apply-9.expect\nt4100/t-apply-9.patch\nt4101/diff.0-1\nt4101/diff.0-2\nt4101/diff.0-3\nt4101/diff.1-0\nt4101/diff.1-2\nt4101/diff.1-3\nt4101/diff.2-0\nt4101/diff.2-1\nt4101/diff.2-3\nt4101/diff.3-0\nt4101/diff.3-1\nt4101/diff.3-2\nt4109/expect-1\nt4109/expect-2\nt4109/expect-3\nt4109/patch1.patch\nt4109/patch2.patch\nt4109/patch3.patch\nt4109/patch4.patch\nt4110/expect\nt4110/patch1.patch\nt4110/patch2.patch\nt4110/patch3.patch\nt4110/patch4.patch\nt4110/patch5.patch\nt4135/.gitignore\nt4135/add-plain.diff\nt4135/add-with backslash.diff\nt4135/add-with quote.diff\nt4135/add-with spaces.diff\nt4135/add-with tab.diff\nt4135/damaged-tz.diff\nt4135/damaged.diff\nt4135/diff-plain.diff\nt4135/diff-with backslash.diff\nt4135/diff-with quote.diff\nt4135/diff-with spaces.diff\nt4135/diff-with tab.diff\nt4135/funny-tz.diff\nt4135/git-plain.diff\nt4135/git-with backslash.diff\nt4135/git-with quote.diff\nt4135/git-with spaces.diff\nt4135/git-with tab.diff\nt4135/make-patches\nt4211/expect.beginning-of-file\nt4211/expect.end-of-file\nt4211/expect.move-support-f\nt4211/expect.multiple\nt4211/expect.multiple-overlapping\nt4211/expect.multiple-superset\nt4211/expect.parallel-change-f-to-main\nt4211/expect.simple-f\nt4211/expect.simple-f-to-main\nt4211/expect.simple-main\nt4211/expect.simple-main-to-end\nt4211/expect.two-ranges\nt4211/expect.vanishes-early\nt4211/history.export\nt4252/am-test-1-1\nt4252/am-test-1-2\nt4252/am-test-2-1\nt4252/am-test-2-2\nt4252/am-test-3-1\nt4252/am-test-3-2\nt4252/am-test-4-1\nt4252/am-test-4-2\nt4252/am-test-5-1\nt4252/am-test-5-2\nt4252/am-test-6-1\nt4252/file-1-0\nt4252/file-2-0\nt5000/19f9c8273ec45a8938e6999cb59b3ff66739902a\nt5000/huge-and-future.tar\nt5000/pax.tar\nt5003/infozip-symlinks.zip\nt5004/empty-with-pax-header.tar\nt5004/empty.zip\nt5100/.gitattributes\nt5100/0001mboxrd\nt5100/0002mboxrd\nt5100/embed-from.expect\nt5100/embed-from.in\nt5100/empty\nt5100/info-from.expect\nt5100/info-from.in\nt5100/info0001\nt5100/info0002\nt5100/info0003\nt5100/info0004\nt5100/info0005\nt5100/info0006\nt5100/info0007\nt5100/info0008\nt5100/info0009\nt5100/info0010\nt5100/info0011\nt5100/info0012\nt5100/info0012--message-id\nt5100/info0013\nt5100/info0014\nt5100/info0014--scissors\nt5100/info0015\nt5100/info0015--no-inbody-headers\nt5100/info0016\nt5100/info0016--no-inbody-headers\nt5100/info0017\nt5100/msg0001\nt5100/msg0002\nt5100/msg0003\nt5100/msg0004\nt5100/msg0005\nt5100/msg0006\nt5100/msg0007\nt5100/msg0008\nt5100/msg0009\nt5100/msg0010\nt5100/msg0011\nt5100/msg0012\nt5100/msg0012--message-id\nt5100/msg0013\nt5100/msg0014\nt5100/msg0014--scissors\nt5100/msg0015\nt5100/msg0015--no-inbody-headers\nt5100/msg0016\nt5100/msg0016--no-inbody-headers\nt5100/msg0017\nt5100/nul-b64.expect\nt5100/nul-b64.in\nt5100/nul-plain\nt5100/patch0001\nt5100/patch0002\nt5100/patch0003\nt5100/patch0004\nt5100/patch0005\nt5100/patch0006\nt5100/patch0007\nt5100/patch0008\nt5100/patch0009\nt5100/patch0010\nt5100/patch0011\nt5100/patch0012\nt5100/patch0012--message-id\nt5100/patch0013\nt5100/patch0014\nt5100/patch0014--scissors\nt5100/patch0015\nt5100/patch0015--no-inbody-headers\nt5100/patch0016\nt5100/patch0016--no-inbody-headers\nt5100/patch0017\nt5100/quoted-from.expect\nt5100/quoted-from.in\nt5100/rfc2047-info-0001\nt5100/rfc2047-info-0002\nt5100/rfc2047-info-0003\nt5100/rfc2047-info-0004\nt5100/rfc2047-info-0005\nt5100/rfc2047-info-0006\nt5100/rfc2047-info-0007\nt5100/rfc2047-info-0008\nt5100/rfc2047-info-0009\nt5100/rfc2047-info-0010\nt5100/rfc2047-info-0011\nt5100/rfc2047-samples.mbox\nt5100/sample.mbox\nt5100/sample.mboxrd\nt5515/fetch.br-branches-default\nt5515/fetch.br-branches-default-merge\nt5515/fetch.br-branches-default-merge_branches-default\nt5515/fetch.br-branches-default-octopus\nt5515/fetch.br-branches-default-octopus_branches-default\nt5515/fetch.br-branches-default_branches-default\nt5515/fetch.br-branches-one\nt5515/fetch.br-branches-one-merge\nt5515/fetch.br-branches-one-merge_branches-one\nt5515/fetch.br-branches-one-octopus\nt5515/fetch.br-branches-one-octopus_branches-one\nt5515/fetch.br-branches-one_branches-one\nt5515/fetch.br-config-explicit\nt5515/fetch.br-config-explicit-merge\nt5515/fetch.br-config-explicit-merge_config-explicit\nt5515/fetch.br-config-explicit-octopus\nt5515/fetch.br-config-explicit-octopus_config-explicit\nt5515/fetch.br-config-explicit_config-explicit\nt5515/fetch.br-config-glob\nt5515/fetch.br-config-glob-merge\nt5515/fetch.br-config-glob-merge_config-glob\nt5515/fetch.br-config-glob-octopus\nt5515/fetch.br-config-glob-octopus_config-glob\nt5515/fetch.br-config-glob_config-glob\nt5515/fetch.br-remote-explicit\nt5515/fetch.br-remote-explicit-merge\nt5515/fetch.br-remote-explicit-merge_remote-explicit\nt5515/fetch.br-remote-explicit-octopus\nt5515/fetch.br-remote-explicit-octopus_remote-explicit\nt5515/fetch.br-remote-explicit_remote-explicit\nt5515/fetch.br-remote-glob\nt5515/fetch.br-remote-glob-merge\nt5515/fetch.br-remote-glob-merge_remote-glob\nt5515/fetch.br-remote-glob-octopus\nt5515/fetch.br-remote-glob-octopus_remote-glob\nt5515/fetch.br-remote-glob_remote-glob\nt5515/fetch.br-unconfig\nt5515/fetch.br-unconfig_--tags_.._.git\nt5515/fetch.br-unconfig_.._.git\nt5515/fetch.br-unconfig_.._.git_one\nt5515/fetch.br-unconfig_.._.git_one_tag_tag-one_tag_tag-three-file\nt5515/fetch.br-unconfig_.._.git_one_two\nt5515/fetch.br-unconfig_.._.git_tag_tag-one-tree_tag_tag-three-file\nt5515/fetch.br-unconfig_.._.git_tag_tag-one_tag_tag-three\nt5515/fetch.br-unconfig_branches-default\nt5515/fetch.br-unconfig_branches-one\nt5515/fetch.br-unconfig_config-explicit\nt5515/fetch.br-unconfig_config-glob\nt5515/fetch.br-unconfig_remote-explicit\nt5515/fetch.br-unconfig_remote-glob\nt5515/fetch.master\nt5515/fetch.master_--tags_.._.git\nt5515/fetch.master_.._.git\nt5515/fetch.master_.._.git_one\nt5515/fetch.master_.._.git_one_tag_tag-one_tag_tag-three-file\nt5515/fetch.master_.._.git_one_two\nt5515/fetch.master_.._.git_tag_tag-one-tree_tag_tag-three-file\nt5515/fetch.master_.._.git_tag_tag-one_tag_tag-three\nt5515/fetch.master_branches-default\nt5515/fetch.master_branches-one\nt5515/fetch.master_config-explicit\nt5515/fetch.master_config-glob\nt5515/fetch.master_remote-explicit\nt5515/fetch.master_remote-glob\nt5515/refs.br-branches-default\nt5515/refs.br-branches-default-merge\nt5515/refs.br-branches-default-merge_branches-default\nt5515/refs.br-branches-default-octopus\nt5515/refs.br-branches-default-octopus_branches-default\nt5515/refs.br-branches-default_branches-default\nt5515/refs.br-branches-one\nt5515/refs.br-branches-one-merge\nt5515/refs.br-branches-one-merge_branches-one\nt5515/refs.br-branches-one-octopus\nt5515/refs.br-branches-one-octopus_branches-one\nt5515/refs.br-branches-one_branches-one\nt5515/refs.br-config-explicit\nt5515/refs.br-config-explicit-merge\nt5515/refs.br-config-explicit-merge_config-explicit\nt5515/refs.br-config-explicit-octopus\nt5515/refs.br-config-explicit-octopus_config-explicit\nt5515/refs.br-config-explicit_config-explicit\nt5515/refs.br-config-glob\nt5515/refs.br-config-glob-merge\nt5515/refs.br-config-glob-merge_config-glob\nt5515/refs.br-config-glob-octopus\nt5515/refs.br-config-glob-octopus_config-glob\nt5515/refs.br-config-glob_config-glob\nt5515/refs.br-remote-explicit\nt5515/refs.br-remote-explicit-merge\nt5515/refs.br-remote-explicit-merge_remote-explicit\nt5515/refs.br-remote-explicit-octopus\nt5515/refs.br-remote-explicit-octopus_remote-explicit\nt5515/refs.br-remote-explicit_remote-explicit\nt5515/refs.br-remote-glob\nt5515/refs.br-remote-glob-merge\nt5515/refs.br-remote-glob-merge_remote-glob\nt5515/refs.br-remote-glob-octopus\nt5515/refs.br-remote-glob-octopus_remote-glob\nt5515/refs.br-remote-glob_remote-glob\nt5515/refs.br-unconfig\nt5515/refs.br-unconfig_--tags_.._.git\nt5515/refs.br-unconfig_.._.git\nt5515/refs.br-unconfig_.._.git_one\nt5515/refs.br-unconfig_.._.git_one_tag_tag-one_tag_tag-three-file\nt5515/refs.br-unconfig_.._.git_one_two\nt5515/refs.br-unconfig_.._.git_tag_tag-one-tree_tag_tag-three-file\nt5515/refs.br-unconfig_.._.git_tag_tag-one_tag_tag-three\nt5515/refs.br-unconfig_branches-default\nt5515/refs.br-unconfig_branches-one\nt5515/refs.br-unconfig_config-explicit\nt5515/refs.br-unconfig_config-glob\nt5515/refs.br-unconfig_remote-explicit\nt5515/refs.br-unconfig_remote-glob\nt5515/refs.master\nt5515/refs.master_--tags_.._.git\nt5515/refs.master_.._.git\nt5515/refs.master_.._.git_one\nt5515/refs.master_.._.git_one_tag_tag-one_tag_tag-three-file\nt5515/refs.master_.._.git_one_two\nt5515/refs.master_.._.git_tag_tag-one-tree_tag_tag-three-file\nt5515/refs.master_.._.git_tag_tag-one_tag_tag-three\nt5515/refs.master_branches-default\nt5515/refs.master_branches-one\nt5515/refs.master_config-explicit\nt5515/refs.master_config-glob\nt5515/refs.master_remote-explicit\nt5515/refs.master_remote-glob\nt7500/add-comments\nt7500/add-content\nt7500/add-content-and-comment\nt7500/add-signed-off\nt7500/add-whitespaced-content\nt7500/edit-content\nt8005/euc-japan.txt\nt8005/sjis.txt\nt8005/utf8.txt\nt9000/test.pl\nt9110/svm.dump\nt9111/svnsync.dump\nt9115/funky-names.dump\nt9121/renamed-dir.dump\nt9126/follow-deleted-readded.dump\nt9135/svn.dump\nt9136/svn.dump\nt9150/make-svk-dump\nt9150/svk-merge.dump\nt9151/.gitignore\nt9151/make-svnmerge-dump\nt9151/svn-mergeinfo.dump\nt9153/svn.dump\nt9154/svn.dump\nt9161/branches.dump\nt9601/cvsroot/.gitattributes\nt9601/cvsroot/CVSROOT/.gitignore\nt9601/cvsroot/module/added-imported.txt,v\nt9601/cvsroot/module/imported-anonymously.txt,v\nt9601/cvsroot/module/imported-modified-imported.txt,v\nt9601/cvsroot/module/imported-modified.txt,v\nt9601/cvsroot/module/imported-once.txt,v\nt9601/cvsroot/module/imported-twice.txt,v\nt9602/README\nt9602/cvsroot/.gitattributes\nt9602/cvsroot/CVSROOT/.gitignore\nt9602/cvsroot/module/default,v\nt9602/cvsroot/module/sub1/default,v\nt9602/cvsroot/module/sub1/subsubA/default,v\nt9602/cvsroot/module/sub1/subsubB/default,v\nt9602/cvsroot/module/sub2/Attic/branch_B_MIXED_only,v\nt9602/cvsroot/module/sub2/default,v\nt9602/cvsroot/module/sub2/subsubA/default,v\nt9602/cvsroot/module/sub3/default,v\nt9603/cvsroot/.gitattributes\nt9603/cvsroot/CVSROOT/.gitignore\nt9603/cvsroot/module/a,v\nt9603/cvsroot/module/b,v\nt9604/cvsroot/.gitattributes\nt9604/cvsroot/CVSROOT/.gitignore\nt9604/cvsroot/module/a,v\nt9700/test.pl\nvalgrind/.gitignore\nvalgrind/analyze.sh\nvalgrind/default.supp\nvalgrind/valgrind.sh\nmake: *** [Makefile:72: test-lint-filenames] Error 1\n\nAs a consequence, my two `pu`-based CI jobs failed to run even one\nregression test.\n\nCiao,\nDscho"},{"id":"299439","messageId":"alpine.DEB.2.20.1608161035320.4924@virtualbox","threadId":"43853","inReplyTo":"alpine.DEB.2.20.1608161026110.4924@virtualbox","subject":"Re: [PATCH] t/Makefile: make sure that file names are truly platform-independent","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-08-16T08:42:19Z","receivedAt":"2016-08-16T08:42:34Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Tue, 16 Aug 2016, Johannes Schindelin wrote:\n\n> On Mon, 15 Aug 2016, Junio C Hamano wrote:\n> \n> > Junio C Hamano <gitster@pobox.com> writes:\n> > \n> > >> +test-lint-filenames:\n> > >> +\t@illegal=\"$$(git ls-files | grep '[\"*:<>?\\\\|]')\"; \\\n> > >\n> > > This pattern must exclude questionables on either NTFS or HFS+; it\n> > > is ironic that it is not even sufficient to limit ourselves to the\n> > > Portable Character Set [*1*], but such is life.\n> > >\n> > > By the way, doesn't ls-files take pathspec glob, saving one extra\n> > > process to run grep?\n> \n> I specifically did not do that, sorry for omitting the rationale from the\n> commit message. The reason why I have that grep is so that the backslash\n> can also catch non-ASCII characters, such as \"Hellö-Jüniö\".\n\nAnd there is another very good reason to keep the grep: the problem I just\nreported is *caused* by your avoiding the grep call.\n\nIn my tests, at least, `git ls-files '*\\*' lists *all* files in\nsubdirectories. In other words, it matches the *forward* slash. This also\nhappens when I run the command in cmd.exe instead of Git Bash, meaning\nthat it is *not* caused by some MSYS2 path conversion from pseudo-Unix to\nWindows paths. That only leaves the conclusion that some of our pathspec\ncode tries to be helpful and takes a backslash for a directory separator.\n\nIn light of these problems, and also in light of the fact that the\ntest-lint-filenames code is hardly performance critical, I am strongly in\nfavor of reverting to using grep.\n\nCiao,\nDscho"},{"id":"299440","messageId":"5a23270d14386fa9fb8e75ab328337fef579d06f.1471337271.git.johannes.schindelin@gmx.de","threadId":"43853","inReplyTo":"814aefbcf0f9380098e3f7a183399e11e24180dd.1471270061.git.johannes.schindelin@gmx.de","subject":"[PATCH v2] t/Makefile: make sure that paths can be checked out on platforms we care","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-08-16T08:50:05Z","receivedAt":"2016-08-16T08:50:21Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Some pathnames that are okay on ext4 and on HFS+ cannot be checked\nout on Windows. Tests that want to see operations on such paths on\nfilesystems that support them must do so behind appropriate test\nprerequisites, and must not include them in the source tree (instead\nthey should create them when they run). Otherwise, the source tree\ncannot even be checked out.\n\nMake sure that double-quotes, asterisk, colon, greater/less-than,\nquestion-mark, backslash, tab, vertical-bar, as well as any non-ASCII\ncharacters above 0x7f never appear in the pathnames with a new\ntest-lint-* target as part of a `make test`.\n\nNoticed when a topic wanted to add a pathname with '>' in it.  A\ncheck like this will prevent a similar problems from happening in the\nfuture.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n\n\tI re-munged the commit message (I saw that you munged it in `pu`\n\tand did not quite like the wording, so I permitted myself the\n\tindulgence).\n\n\tAnd of course I tested this, and it does *not* list all files in\n\tsubdirectories of t/ as problematic.\n\nPublished-As: https://github.com/dscho/git/releases/tag/test-lint-filenames-v2\nFetch-It-Via: git fetch https://github.com/dscho/git test-lint-filenames-v2\nInterdiff vs v1:\n\n diff --git a/t/Makefile b/t/Makefile\n index 3c0eb48..bf9cad9 100644\n --- a/t/Makefile\n +++ b/t/Makefile\n @@ -69,7 +69,7 @@ test-lint-shell-syntax:\n  \t@'$(PERL_PATH_SQ)' check-non-portable-shell.pl $(T) $(THELPERS)\n  \n  test-lint-filenames:\n -\t@illegal=\"$$(git ls-files | grep '[\"*:<>?\\\\|]')\"; \\\n +\t@illegal=\"$$(git ls-files | grep '[\t\"*:<>?\\\\|]')\"; \\\n  \t\ttest -z \"$$illegal\" || { \\\n  \t\techo >&2 \"illegal file name(s): \" $$illegal; exit 1; }\n  \n\n\n t/Makefile | 8 +++++++-\n 1 file changed, 7 insertions(+), 1 deletion(-)\n\ndiff --git a/t/Makefile b/t/Makefile\nindex 18e2b28..bf9cad9 100644\n--- a/t/Makefile\n+++ b/t/Makefile\n@@ -52,7 +52,8 @@ clean-except-prove-cache:\n clean: clean-except-prove-cache\n \t$(RM) .prove\n \n-test-lint: test-lint-duplicates test-lint-executable test-lint-shell-syntax\n+test-lint: test-lint-duplicates test-lint-executable test-lint-shell-syntax \\\n+\ttest-lint-filenames\n \n test-lint-duplicates:\n \t@dups=`echo $(T) | tr ' ' '\\n' | sed 's/-.*//' | sort | uniq -d` && \\\n@@ -67,6 +68,11 @@ test-lint-executable:\n test-lint-shell-syntax:\n \t@'$(PERL_PATH_SQ)' check-non-portable-shell.pl $(T) $(THELPERS)\n \n+test-lint-filenames:\n+\t@illegal=\"$$(git ls-files | grep '[\t\"*:<>?\\\\|]')\"; \\\n+\t\ttest -z \"$$illegal\" || { \\\n+\t\techo >&2 \"illegal file name(s): \" $$illegal; exit 1; }\n+\n aggregate-results-and-cleanup: $(T)\n \t$(MAKE) aggregate-results\n \t$(MAKE) clean\n-- \n2.9.2.691.g78954f3\n\nbase-commit: 70dce4aee55ad8a39a53f86f37a4bd400e0cac7d\n"},{"id":"299444","messageId":"xmqqmvkddoqi.fsf@gitster.mtv.corp.google.com","threadId":"43853","inReplyTo":"alpine.DEB.2.20.1608161035320.4924@virtualbox","subject":"Re: [PATCH] t/Makefile: make sure that file names are truly platform-independent","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-08-16T09:53:09Z","receivedAt":"2016-08-16T09:53:33Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n>> > > By the way, doesn't ls-files take pathspec glob, saving one extra\n>> > > process to run grep?\n>> \n>> I specifically did not do that, sorry for omitting the rationale from the\n>> commit message. The reason why I have that grep is so that the backslash\n>> can also catch non-ASCII characters, such as \"Hellö-Jüniö\".\n\nThat's clever and I did miss that.  It deserves an in-code comment\nnext to the use of separate grep to prevent others from making the\nsame mistake in the future.  Having an explanation in the log message\nwould help but not sufficient for a subtle construct like this.\n\nThe trick to catch non-ascii depends on core.quotepath set to true\n(which is the default).  You would need to run ls-files with an\nexplicit \"-c core.quotepath=false\" to be safe.\n\nIt also means that the addition of HT to the grep pattern I\nsuggested is not necessary, because ls-files will always use \"a\\tb\"\nform for a pathname with HT, and you will catch it by looking for\nthe backslash.  You can lose '\"' from the grep pattern for the same\nreason.\n\nTwo other tricky things are\n\n (1) the test may be run inside a tarball extract and \"git ls-files\"\n     may not report the pathnames in t/.\n\n (2) the user may not have a working Git yet in her path.\n\nThe invocation of \"git -c core.quotepath=false ls-files\" needs to at\nleast have 2>/dev/null to squelch an unnecessary error message.  In\nsuch a scenario, we may miss a new offending pathname, but we will\nnot have false positive and I think that is the best we can do.\n\nThanks.\n"},{"id":"299446","messageId":"xmqqinv1do2d.fsf@gitster.mtv.corp.google.com","threadId":"43853","inReplyTo":"xmqqmvkddoqi.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH] t/Makefile: make sure that file names are truly platform-independent","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-08-16T10:07:38Z","receivedAt":"2016-08-16T10:07:47Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> The trick to catch non-ascii depends on core.quotepath set to true\n> (which is the default).  You would need to run ls-files with an\n> explicit \"-c core.quotepath=false\" to be safe.\n> ...\n> The invocation of \"git -c core.quotepath=false ls-files\" needs to at\n> least have 2>/dev/null to squelch an unnecessary error message.  In\n> such a scenario, we may miss a new offending pathname, but we will\n> not have false positive and I think that is the best we can do.\n>\n> Thanks.\n\nNeedless to say (1) both \"false\" should have been \"true\"; (2) I\nshouldn't be crawling out of bed and typing with hazy brain early in\nthe morning.\n\nSorry for typoes and thinkos.\n"},{"id":"299452","messageId":"alpine.DEB.2.20.1608161502240.4924@virtualbox","threadId":"43853","inReplyTo":"20160815184315.cyhln2bxg465lq2l@sigill.intra.peff.net","subject":"Re: [PATCH] t/Makefile: make sure that file names are truly platform-independent","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-08-16T13:10:46Z","receivedAt":"2016-08-16T13:13:44Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Peff & Junio,\n\nOn Mon, 15 Aug 2016, Jeff King wrote:\n\n> On Mon, Aug 15, 2016 at 09:57:52AM -0700, Junio C Hamano wrote:\n> \n> > I wonder if we already have a good mechanism to allow a project and\n> > its participants (say, \"me\") to declare \"in this project, pathnames\n> > must conform to this rule\" and help them avoid creating a tree that\n> > violates the rule customized to their project.\n> > \n> > I guess \"write_index_as_tree()\" would be one of the central places to\n> > hook into and that covers an individual contributor or a patch applier\n> > who ends up adding offending paths to the project, as well as a merge\n> > made in response to a pull request (unless it is a fast-forward)\n> > [*1*].  The pre-receive hook can also be used to inspect and reject an\n> > attempt to push an offending tree into the history.\n\nFWIW I think it should be at a different level. See below for more\ndetails.\n\n> > Such a mechanism would allow a project that wants participation by\n> > folks with case insensitive filesystems to ensure that they do not\n> > create a directory that has both xt_TCPMSS.h and xt_tcpmss.h at the\n> > same time, for example, but the mechanism needs to allow visibility\n> > into more than just a single path when the custom check is made (e.g.\n> > a hook run in \"write_index_as_tree()\" can see all entries in the index\n> > to make the decision; if we were to also hook into \"add_to_index()\",\n> > the hook must be able to see other entries in the index to which the\n> > new entry is being added).\n> \n> I am not convinced this mechanism needs to be built into git. Because it\n> happens to be about filenames, git at least has a hope of making sense\n> of the various project rules.\n\nBoth of you gentle people may recall a conversation in December 2014 when\nwe scrambled to plug a hole where maliciously-chosen file names would have\nallowed to wreak havoc with a local Git repository's config (among other\nthings).\n\nWe did plug it, but not before I proposed to exclude many more file names\nthan just maliciously-chosen ones. For example, I wanted to exclude all\nfile names that are illegal on Windows when core.protectNTFS was set to\ntrue.\n\nIf we were to implement this \"let's help cross-platform projects\"\nfunctionality, it would be at that same level.\n\nHowever, I have to agree with Junio that Git is *not* targeting *all*\nplatforms. Conversely, any solution we implement to try to be helpful by\npointing out unportable file names will certainly fall short of *some*\nproject's requirement.\n\nGiven that we have no shortage of problems to solve, I would vote for\naddressing portability only as far as Git and its intended target\nplatforms are concerned.\n\nCiao,\nDscho\n"},{"id":"299459","messageId":"20160816145532.nfooqmkaostc2e7t@sigill.intra.peff.net","threadId":"43853","inReplyTo":"alpine.DEB.2.20.1608161502240.4924@virtualbox","subject":"Re: [PATCH] t/Makefile: make sure that file names are truly platform-independent","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2016-08-16T14:55:33Z","receivedAt":"2016-08-16T14:55:48Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Aug 16, 2016 at 03:10:46PM +0200, Johannes Schindelin wrote:\n\n> > I am not convinced this mechanism needs to be built into git. Because it\n> > happens to be about filenames, git at least has a hope of making sense\n> > of the various project rules.\n> \n> Both of you gentle people may recall a conversation in December 2014 when\n> we scrambled to plug a hole where maliciously-chosen file names would have\n> allowed to wreak havoc with a local Git repository's config (among other\n> things).\n> \n> We did plug it, but not before I proposed to exclude many more file names\n> than just maliciously-chosen ones. For example, I wanted to exclude all\n> file names that are illegal on Windows when core.protectNTFS was set to\n> true.\n> \n> If we were to implement this \"let's help cross-platform projects\"\n> functionality, it would be at that same level.\n\nHrm. I am not sure I agree. At GitHub, for instance, we turn on\ncore.protectNTFS for all repositories because we do want to be a vector\nfor attacks. So the tradeoff is a good one: the restrictions on\nfilenames are not that big, and we gain a lot of safety (i.e., a known\nremote code execution bug).\n\nWhereas if core.protectNTFS started disallowing trees with both \"foo\"\nand \"FOO\", that is a much different tradeoff. It is much more likely to\ncome up, and it is protecting a much less valuable thing (it's an\nannoyance, not a security hole). Projects which do not care about people\non case-insensitive filesystems will be annoyed to have their commits\nrejected (whether they are right to be so uncaring or not can be\ndebated, but I am not sure that GitHub wants to enforce a hard policy at\nthe fsck layer).\n\nSo even if we wanted a similar mechanism, I think it has to be triggered\nby a separate config option. And I do not think general hosting sites\nwould turn it on. It's really a project decision, not a hosting-site\none.\n\nThere may be some rules that are in between. I.e., names that are\nillegal on some common platform but are extremely unlikely to be chosen\nin general. I'd have to see the rules to give an opinion.\n\n-Peff\n"},{"id":"299461","messageId":"alpine.DEB.2.20.1608161710100.4924@virtualbox","threadId":"43853","inReplyTo":"xmqqinv1do2d.fsf@gitster.mtv.corp.google.com","subject":"Re: [PATCH] t/Makefile: make sure that file names are truly platform-independent","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-08-16T15:10:36Z","receivedAt":"2016-08-16T15:11:37Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Tue, 16 Aug 2016, Junio C Hamano wrote:\n\n> Junio C Hamano <gitster@pobox.com> writes:\n> \n> > The trick to catch non-ascii depends on core.quotepath set to true\n> > (which is the default).  You would need to run ls-files with an\n> > explicit \"-c core.quotepath=false\" to be safe.\n> > ...\n> > The invocation of \"git -c core.quotepath=false ls-files\" needs to at\n> > least have 2>/dev/null to squelch an unnecessary error message.  In\n> > such a scenario, we may miss a new offending pathname, but we will\n> > not have false positive and I think that is the best we can do.\n> >\n> > Thanks.\n> \n> Needless to say (1) both \"false\" should have been \"true\"; (2) I\n> shouldn't be crawling out of bed and typing with hazy brain early in\n> the morning.\n> \n> Sorry for typoes and thinkos.\n\nSorry for not even expecting an answer from you that early. I will send\nout a v3 in a moment that should address your concerns.\n\nCiao,\nDscho\n"},{"id":"299462","messageId":"b7691bb3c9c0b46dbea7b29638120e9288cfb9b8.1471360183.git.johannes.schindelin@gmx.de","threadId":"43853","inReplyTo":"5a23270d14386fa9fb8e75ab328337fef579d06f.1471337271.git.johannes.schindelin@gmx.de","subject":"[PATCH v3] t/Makefile: ensure that paths are valid on platforms we care","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-08-16T15:13:25Z","receivedAt":"2016-08-16T15:13:49Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Some pathnames that are okay on ext4 and on HFS+ cannot be checked\nout on Windows. Tests that want to see operations on such paths on\nfilesystems that support them must do so behind appropriate test\nprerequisites, and must not include them in the source tree (instead\nthey should create them when they run). Otherwise, the source tree\ncannot even be checked out.\n\nMake sure that double-quotes, asterisk, colon, greater/less-than,\nquestion-mark, backslash, tab, vertical-bar, as well as any non-ASCII\ncharacters never appear in the pathnames with a new test-lint-* target\nas part of a `make test`. To that end, we call `git ls-files` (ensuring\nthat the paths are quoted properly), relying on the fact that paths\ncontaining non-ASCII characters are quoted within double-quotes.\n\nIn case that the source code does not actually live in a Git\nrepository (e.g. when extracted from a .zip file), or that the `git`\nexecutable cannot be executed, we simply ignore the error for now; In\nthat case, our trusty Continuous Integration will be the last line of\ndefense and catch any problematic file name.\n\nNoticed when a topic wanted to add a pathname with '>' in it.  A\ncheck like this will prevent a similar problems from happening in the\nfuture.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n\n\tAgain some touch-ups to the commit message.\n\n\tPlease note that the paths are now quoted within double-quotes,\n\tthanks to the core.quotepaths setting. As such, non-ASCII\n\tcharacters are no longer caught through the backslash, but through\n\tthe double-quote character (i.e. '\"').\n\n\tAs previously, tested on Linux and Windows and verified that it\n\tdoes the job.\n\nPublished-As: https://github.com/dscho/git/releases/tag/test-lint-filenames-v3\nFetch-It-Via: git fetch https://github.com/dscho/git test-lint-filenames-v3\nInterdiff vs v2:\n\n diff --git a/t/Makefile b/t/Makefile\n index bf9cad9..d613935 100644\n --- a/t/Makefile\n +++ b/t/Makefile\n @@ -69,9 +69,12 @@ test-lint-shell-syntax:\n  \t@'$(PERL_PATH_SQ)' check-non-portable-shell.pl $(T) $(THELPERS)\n  \n  test-lint-filenames:\n -\t@illegal=\"$$(git ls-files | grep '[\t\"*:<>?\\\\|]')\"; \\\n -\t\ttest -z \"$$illegal\" || { \\\n -\t\techo >&2 \"illegal file name(s): \" $$illegal; exit 1; }\n +\t@# We do *not* pass a glob to ls-files but use grep instead, to catch\n +\t@# non-ASCII characters (which are quoted within double-quotes)\n +\t@bad=\"$$(git -c core.quotepath=true ls-files 2>/dev/null | \\\n +\t\t\tgrep '[\"*:<>?\\\\|]')\"; \\\n +\t\ttest -z \"$$bad\" || { \\\n +\t\techo >&2 \"non-portable file name(s): $$bad\"; exit 1; }\n  \n  aggregate-results-and-cleanup: $(T)\n  \t$(MAKE) aggregate-results\n\n\n t/Makefile | 11 ++++++++++-\n 1 file changed, 10 insertions(+), 1 deletion(-)\n\ndiff --git a/t/Makefile b/t/Makefile\nindex 18e2b28..d613935 100644\n--- a/t/Makefile\n+++ b/t/Makefile\n@@ -52,7 +52,8 @@ clean-except-prove-cache:\n clean: clean-except-prove-cache\n \t$(RM) .prove\n \n-test-lint: test-lint-duplicates test-lint-executable test-lint-shell-syntax\n+test-lint: test-lint-duplicates test-lint-executable test-lint-shell-syntax \\\n+\ttest-lint-filenames\n \n test-lint-duplicates:\n \t@dups=`echo $(T) | tr ' ' '\\n' | sed 's/-.*//' | sort | uniq -d` && \\\n@@ -67,6 +68,14 @@ test-lint-executable:\n test-lint-shell-syntax:\n \t@'$(PERL_PATH_SQ)' check-non-portable-shell.pl $(T) $(THELPERS)\n \n+test-lint-filenames:\n+\t@# We do *not* pass a glob to ls-files but use grep instead, to catch\n+\t@# non-ASCII characters (which are quoted within double-quotes)\n+\t@bad=\"$$(git -c core.quotepath=true ls-files 2>/dev/null | \\\n+\t\t\tgrep '[\"*:<>?\\\\|]')\"; \\\n+\t\ttest -z \"$$bad\" || { \\\n+\t\techo >&2 \"non-portable file name(s): $$bad\"; exit 1; }\n+\n aggregate-results-and-cleanup: $(T)\n \t$(MAKE) aggregate-results\n \t$(MAKE) clean\n-- \n2.9.2.691.g78954f3\n\nbase-commit: 70dce4aee55ad8a39a53f86f37a4bd400e0cac7d\n"},{"id":"299464","messageId":"alpine.DEB.2.20.1608161732390.4924@virtualbox","threadId":"43853","inReplyTo":"20160816145532.nfooqmkaostc2e7t@sigill.intra.peff.net","subject":"Re: [PATCH] t/Makefile: make sure that file names are truly platform-independent","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2016-08-16T15:37:35Z","receivedAt":"2016-08-16T15:37:57Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Peff,\n\nOn Tue, 16 Aug 2016, Jeff King wrote:\n\n> On Tue, Aug 16, 2016 at 03:10:46PM +0200, Johannes Schindelin wrote:\n> \n> > > I am not convinced this mechanism needs to be built into git.\n> > > Because it happens to be about filenames, git at least has a hope of\n> > > making sense of the various project rules.\n> > \n> > Both of you gentle people may recall a conversation in December 2014\n> > when we scrambled to plug a hole where maliciously-chosen file names\n> > would have allowed to wreak havoc with a local Git repository's config\n> > (among other things).\n> > \n> > We did plug it, but not before I proposed to exclude many more file\n> > names than just maliciously-chosen ones. For example, I wanted to\n> > exclude all file names that are illegal on Windows when\n> > core.protectNTFS was set to true.\n> > \n> > If we were to implement this \"let's help cross-platform projects\"\n> > functionality, it would be at that same level.\n> \n> Hrm. I am not sure I agree. At GitHub, for instance, we turn on\n> core.protectNTFS for all repositories because we do want to be a vector\n> for attacks.\n\nI trust you meant \"do *not* want to be a vector for attacks\"...\n\n> So the tradeoff is a good one: the restrictions on filenames are not\n> that big, and we gain a lot of safety (i.e., a known remote code\n> execution bug).\n> \n> Whereas if core.protectNTFS started disallowing trees with both \"foo\"\n> and \"FOO\", that is a much different tradeoff. It is much more likely to\n> come up, and it is protecting a much less valuable thing (it's an\n> annoyance, not a security hole). Projects which do not care about people\n> on case-insensitive filesystems will be annoyed to have their commits\n> rejected (whether they are right to be so uncaring or not can be\n> debated, but I am not sure that GitHub wants to enforce a hard policy at\n> the fsck layer).\n> \n> So even if we wanted a similar mechanism, I think it has to be triggered\n> by a separate config option. And I do not think general hosting sites\n> would turn it on. It's really a project decision, not a hosting-site\n> one.\n> \n> There may be some rules that are in between. I.e., names that are\n> illegal on some common platform but are extremely unlikely to be chosen\n> in general. I'd have to see the rules to give an opinion.\n\nGood point.\n\nWhat I meant in my curt language was actually not to use core.protectNTFS\nper se, but the same code path. That is, I would rather have any such\n\"cross-platform helping\" code in verify_path() rather than\nwrite_index_as_tree().\n\nBut you are correct, this hypothetical feature (pretty hypothetical,\nindeed, at this point) would have to be configured differently than\nvia core.protectNTFS=true.\n\nCiao,\nDscho\n"},{"id":"299466","messageId":"20160816153948.emnkazqtwluxwun3@sigill.intra.peff.net","threadId":"43853","inReplyTo":"alpine.DEB.2.20.1608161732390.4924@virtualbox","subject":"Re: [PATCH] t/Makefile: make sure that file names are truly platform-independent","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2016-08-16T15:39:48Z","receivedAt":"2016-08-16T15:40:01Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Aug 16, 2016 at 05:37:35PM +0200, Johannes Schindelin wrote:\n\n> > Hrm. I am not sure I agree. At GitHub, for instance, we turn on\n> > core.protectNTFS for all repositories because we do want to be a vector\n> > for attacks.\n> \n> I trust you meant \"do *not* want to be a vector for attacks\"...\n\nHeh, yes.\n\n> Good point.\n> \n> What I meant in my curt language was actually not to use core.protectNTFS\n> per se, but the same code path. That is, I would rather have any such\n> \"cross-platform helping\" code in verify_path() rather than\n> write_index_as_tree().\n> \n> But you are correct, this hypothetical feature (pretty hypothetical,\n> indeed, at this point) would have to be configured differently than\n> via core.protectNTFS=true.\n\nAh, OK. Yeah, I don't have any real objection to that. I'm not sure how\neasy it would be to check verify_path() for an existing commit (say, as\npart of a pre-commit hook, or a pre-receive, or in a CI test). But if it\nis not easy, that seems like a problem that can (and should) be fixed\nseparately.\n\n-Peff\n"},{"id":"299511","messageId":"6a3964b6-9488-b6e6-ab32-15dd9a965454@kdbg.org","threadId":"43853","inReplyTo":"alpine.DEB.2.20.1608161035320.4924@virtualbox","subject":"Re: [PATCH] t/Makefile: make sure that file names are truly platform-independent","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2016-08-16T21:10:34Z","receivedAt":"2016-08-16T21:10:45Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 16.08.2016 um 10:42 schrieb Johannes Schindelin:\n> That only leaves the conclusion that some of our pathspec\n> code tries to be helpful and takes a backslash for a directory separator.\n\nVery true. The code that does this is in prefix_filename():\n\nhttps://github.com/git/git/blob/master/abspath.c#L170\n\n-- Hannes\n\n"}]}