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

Empty name in fast-import stream.

From
AUAlexander Usov <a.s.usov@gmail.com>
Date
Oct 30, 2012, 00:16 UTC
Message-ID
<CAH_EFyZc3gjOVDKKeVAFuU_KMtf9utr=jEaiRfjujtkTZAGoAA@mail.gmail.com>
Hi,

I'm working now on converting large repo to git, and stumbled upon a case where fast-import from old git creates incorrect commit objects. The case is following: when exporting the commit where the only thing I know about committer is email, fast-import spec dictates following format:

committer <foo@bar.com> 123456789 +100

with just 1 space between committer and opening brace. Apparently git-fast-import in 1.7.1 would produce a commit object with just 1 space in there too. And git-fsck in newer versions of git would complain about this commit object.

The workaround I found is to emit 2 spaces between committer and opening bracket. Such stream is accepted by both 1.7.1 and 1.8 and they both produce correct commit objects.

I'm wondering if it is worth changing git-fast-import manual page to have following rule for committer (and author):

('author' SP <name>? SP LT <email> GT SP <when> LF)? 'committer' SP <name>? SP LT <email> GT SP <when> LF

This format results in the fast-import streams which are correctly handled by both old and newer git versions.

-- 
Best regards,
  Alexander.
Message 1 of 1 in “Empty name in fast-import stream.”
  1. Alexander UsovOct 30, 2012

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.