Skip to content

windows: avoid illegal filenames during a build #216

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

dscho
Copy link
Member

@dscho dscho commented May 20, 2019

The + is not allowed on NTFS filesystems. Even if the MSYS2 make/bash we use to build Git for Windows can work around it, it is not necessary.

A `+` is not a valid part of a filename with Windows file systems (it is
reserved because the `+` operator meant file concatenation back in the
DOS days).

When building in Git for Windows' SDK, the `make.exe` that interprets
our `Makefile` is an MSYS2 program, which uses the MSYS2/Cygwin trick of
mapping such illegal characters into the private Unicode page, so as
long as you use programs that are aware of this trick (all MSYS2/Cygwin
programs are, however e.g. `git.exe` is not) things are all dandy.

Let's just not use the `+` character.

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho dscho added the ready to submit Has commits that have not been submitted yet label May 20, 2019
@dscho
Copy link
Member Author

dscho commented Jul 4, 2019

/submit

@gitgitgadget
Copy link

gitgitgadget bot commented Jul 4, 2019

Submitted as [email protected]

@dscho dscho removed the ready to submit Has commits that have not been submitted yet label Jul 4, 2019
@dscho
Copy link
Member Author

dscho commented Jul 11, 2019

Looks like this change has to be reverted out of Git for Windows, and this PR needs to be closed without being merged. Let's give Junio a bit of time to ultimately make up his mind about the aesthetic concerns I have about the current code.

dscho added a commit to git-for-windows/git that referenced this pull request Jul 29, 2019
The problem this patch tried to solve is that `+` is not a valid part of
a file name on FAT file systems, so it won't work in general.

In practice, it still will work, at least for building Git for Windows,
because the MSYS2 runtime uses a trick inherited from Cygwin to handle
file names that would be illegal: the characters are simply mapped into
a private Unicode page.

This patch was soundly rejected on the Git mailing list (see
gitgitgadget#216 for details), in particular
after this developer figured out that `+` is actually a valid file name
character on NTFS.

So let's drop it from Git for Windows' patch thicket.

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho dscho closed this Jul 29, 2019
@dscho dscho deleted the mingw-avoid-illegal-filenames branch July 29, 2019 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant