git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/1] Avoid illegal filenames when building Documentation on NTFS

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 10, 2019, 18:26 UTC
Message-ID
<xmqqef2xu4oz.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<xmqqef2zw9op.fsf@gitster-ct.c.googlers.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 7 quoted lines
>> In addition, your `+` scheme will break on Windows once it uses `git.exe`
>> or any other non-MSYS2 helper...
>
> I am not sure what you mean here.  Is your git.exe disabled not to
> be able to do this: "git.exe add hello+kitty.txt"?  I think that is
> a more grave problem, and not limited to the Makefile in the
> Documentation/ directory.

The reason why I thought it was a more grave problem is because (1) gets 7648757 out of (2), which gets 2297783817 (that is, among the 2.2 billion paths that appear in various GitHub public repositories, a tad short of 8 million paths have '+' somewhere):

    (1) SELECT count(*) FROM `bigquery-public-data.github_repos.files`
        where path like '%+%';
    (2) SELECT count(*) FROM `bigquery-public-data.github_repos.files`;

If you drop the technique MSYS2 borrowed from Cygwin to support these characters NTFS does not like by mapping them to a private page, wouldn't it mean that these projects cannot be used with Git for Windows? Are we going to bug each of these projects to change their pathnames?

If that is not the case, then that's fine.

FWIW, I am OK with moving away from '+' in *our* project; that is easy enough to do, and such a change does not have to make the end result visually less pleasing, as long as we pick a good substitute suffix. Is '~' (or ',') allowed on NTFS, for example? The point of '+' being short, sweet, and easy to spot, I'd rather not to use '.<anyword>' if we can avoid it.

Whatever suffix we choose, we need to be aware that the pattern is not limited to Documentation/ directory, so at least the top level .gitignore and Makefile in various subdirectories need vetting.

Previous: Johannes SchindelinNext: Johannes Schindelin
Message 7 of 8 in “windows: avoid illegal filenames during a build”
  1. 0/1 windows: avoid illegal filenames during a buildJohannes Schindelin via GitGitGadget, Jul 4, 2019
  2. 1/1 Avoid illegal filenames when building Documentation on NTFSJohannes Schindelin via GitGitGadget, Jul 4, 2019
  3. Junio C HamanoJul 8, 2019
  4. Johannes SchindelinJul 9, 2019
  5. Junio C HamanoJul 9, 2019
  6. Johannes SchindelinJul 10, 2019
  7. Junio C HamanoJul 10, 2019
  8. Johannes SchindelinJul 10, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.