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

Re: Crash when clone includes magic filenames on Windows

From
Philip Oakley <philipoakley@iee.org>
Date
Feb 10, 2018, 15:27 UTC
Message-ID
<00CF0CF5FAFD47F6BA3478838677BBAB@PhilipOakley>
In-Reply-To
<BD73CAACE3734EE89EE1CFBE1DC55FEC@PhilipOakley>
From: "Philip Oakley" <philipoakley@iee.org>
Show 33 quoted lines
> From: "Jeffrey Walton" <noloader@gmail.com>
>> Hi Everyone,
>>
>> I'm seeing this issue on Windows: https://pastebin.com/YfB25E4T . It
>> seems the filename AUX is the culprit. Also see
>> https://blogs.msdn.microsoft.com/oldnewthing/20031022-00/?p=42073 .
>> (Thanks to Milleneumbug on Stack Overflow).
>>
>> I did not name the file, someone else did. I doubt the filename will be
>> changed.
>>
>> Searching is not turning up much information:
>> https://www.google.com/search?q=git+"magic+filenames"+windows
>>
>> Does anyone know how to sidestep the issue on Windows?
>>
>> Jeff
>>
> This comes up on the Git-for-Windows (GfW) issues fairly often
> https://github.com/git-for-windows/git/issues.
>
> The fetch part of the clone is sucessful, but the final checkout step
> fails when the AUX (or any other prohibited filename - that's proper
> cabkward compatibility for you) is to be checked out then the file system
> (FS) refuses and the checkout 'fails. You do however have the full repo
> locally.
>
> The trick is probably then to set up a sparse checkout so the AUX is never
> included on the FS.
>
> However it is an open 'up-for-grabs' project to add such a check in GfW.
>
> Philip

One option maybe to extend the $GIT_DIR/info/sparse-checkout capability and add a specific $GIT_DIR/info/never-sparse-checkout file that could carry the complement (files & dirs) options that are platform applicable (no AUX, no COM1, no colons, etc.;-), so that it does not conflict with the users' regular sparse checkout selection in $GIT_DIR/info/sparse-checkout. It's probably easier to understand that way. -- Philip

Previous: Philip Oakley
Message 5 of 5 in “Crash when clone includes magic filenames on Windows”
  1. Jeffrey WaltonFeb 10, 2018
  2. Torsten BögershausenFeb 10, 2018
  3. Jeffrey WaltonFeb 10, 2018
  4. Philip OakleyFeb 10, 2018
  5. Philip OakleyFeb 10, 2018

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.