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

[PATCH 0/2] Refuse to write to reserved filenames on Windows

From
Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>
Date
Dec 21, 2019, 22:04 UTC
Message-ID
<pull.496.git.1576965901.gitgitgadget@gmail.com>

On Windows, for historical reasons, file names such as aux.c, nul.txt are not allowed. For aux.c, attempts to write such a file will result in an obscure error, for nul.txt the call will succeed but no such file will appear, ever, instead the effect will be equivalent to writing to /dev/null on Linux/Unix.

Let's help users by refusing to create such files altogether, with an informative error message.

Johannes Schindelin (2):
  mingw: short-circuit the conversion of `/dev/null` to UTF-16
  mingw: refuse paths containing reserved names
 compat/mingw.c        | 122 +++++++++++++++++++++++++++++++++++-------
 compat/mingw.h        |  11 +++-
 t/t0060-path-utils.sh |  13 ++++-
 3 files changed, 122 insertions(+), 24 deletions(-)
base-commit: 53a06cf39b756eddfe4a2a34da93e3d04eb7b728
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-496%2Fdscho%2Fmingw-reserved-filenames-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-496/dscho/mingw-reserved-filenames-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/496
-- 
gitgitgadget
Next: Johannes Schindelin via GitGitGadget
Message 1 of 3 in “Refuse to write to reserved filenames on Windows”
  1. 0/2 Refuse to write to reserved filenames on WindowsJohannes Schindelin via GitGitGadget, Dec 21, 2019
  2. 2/2 mingw: refuse paths containing reserved namesJohannes Schindelin via GitGitGadget, Dec 21, 2019
  3. 1/2 mingw: short-circuit the conversion of `/dev/null` to UTF-16Johannes Schindelin via GitGitGadget, Dec 21, 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.