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

Re: git-fast-import doc problem and git-fast-export does not quote filenames correctly

From
Michael Haggerty <mhagger@alum.mit.edu>
Date
Sep 4, 2010, 19:48 UTC
Message-ID
<4C82A2AA.3010408@alum.mit.edu>
In-Reply-To
<AANLkTimsVQ=mg2EUhUEO5ZWQMZoA72B=p2+1ZA=1qBtn@mail.gmail.com>
Sverre Rabbelier wrote:
Show 6 quoted lines
> On Sat, Sep 4, 2010 at 01:17, Michael Haggerty <mhagger@alum.mit.edu> wrote:
>> The first problem is that the doc seems to allow NUL bytes (which I
>> suspect are not really allowed)
> 
> Fast import keeps reading until it finds a '\n' and stores data in a
> strbuf, so I don't see why 'NUL' would not be allowed.

I guess I just found it hard to believe that git, with all of its scripts, would really be able to handle NUL characters in filenames. Moreover, even if git allows it, I think NUL is prohibited in posix filenames, so it would be pretty pointless.

In the end, I asked this question to help figure out what filenames "cvs2git" should allow through to git. A NUL character could only get into a CVS filename if the user writes some strange code to transform the filename, so I guess I don't mind letting it through to git if there is some chance that git can handle it.

> [...] Backslashes are allowed, and it seems they need to be escaped as
> usual. Perhaps Shawn can confirm that this should just be updated in
> the docs.

Thanks for the info! Assuming that Shawn doesn't contradict you, I will let any characters through and quote characters as you suggest.

Michael
Previous: Sverre Rabbelier
Message 3 of 3 in “git-fast-import doc problem and git-fast-export does not quote filenames correctly”
  1. Michael HaggertySep 4, 2010
  2. Sverre RabbelierSep 4, 2010
  3. Michael HaggertySep 4, 2010

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.