threads / discuss / 31974

Empty name in fast-import stream.

Subject: Empty name in fast-import stream.

## tl;dr

One message between Oct 30, 2012 and Oct 30, 2012.

replies: 0people: 1as markdown or json

Alexander Usov· Oct 30, 2012, 00:16 UTC · lore
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.

← back to recent threads