From: Dmitry Ivankov <divanorama@gmail.com>
To: git@vger.kernel.org
Subject: Re: SP in committer line in fast-import stream
Date: Mon, 18 Jul 2011 15:38:19 +0000 (UTC) [thread overview]
Message-ID: <loom.20110718T172927-173@post.gmane.org> (raw)
In-Reply-To: CAE3X6mwJquoHj06FVGTsg0qtzyTwbd6gNqy7J4yWiVF-+p-23Q@mail.gmail.com
Hi,
SASAKI Suguru <sss.sonik <at> gmail.com> writes:
>
> Hi,
>
> I'm working with data from `bzr fast-export` and `git fast-import`.
> (bzr is 2.4b5, git is 1.7.5.4, on Debian GNU/Linux (sid))
>
> Export and import themselves are OK,
> but `git fsck --strict` exits with error, saying:
>
> error in commit 2e7a16fbe57b555c1c5954470ef66f3a2a089288: invalid
> author/committer line - missing space before email
>
> and pushing to remote like GitHub fails.
>
> I found minimal OK-data unlike `bzr fast-export` outputs and NG-data
> like `bzr fast-export`.
> (Attached: test_NG.data.txt and test_OK.data.txt)
>
> Only one difference between these is a space in committer line.
> * OK: 'committer' SP SP LT GT ...
> * NG: 'committer' SP LT GT ...
>
> `man git-fast-import` says:
>
> commit
> Create or update a branch with a new commit, recording one logical
> change to the project.
>
> 'commit' SP <ref> LF
> mark?
> ('author' (SP <name>)? SP LT <email> GT SP <when> LF)?
> 'committer' (SP <name>)? SP LT <email> GT SP <when> LF
> data
> ('from' SP <committish> LF)?
> ('merge' SP <committish> LF)?
> (filemodify | filedelete | filecopy | filerename | filedeleteall
> | notemodify)*
> LF?
>
> I think, from this notations, both data is OK.
> What's the problem?
The problem is with git-fast-import that it doesn't verify the format strictly
here.
For example following (no LT) will pass:
<name> SP <email> GT
The second problem is that it generates "bad" committer, in fact name-email is
used as-is, so at least it should convert absent name to a empty name. Or maybe
just fix the format to make string obligatory.
There even is a third minor problem, fsck will report confusing "missing space"
for the no-LT example.
Third one is a clear.
Your one is the second one, while internally it pulls the first one too.
The shortest fix is to read documentation as
'committer' SP <name> SP LT <email> GT SP <when> LF
>
> Regards,
>
next prev parent reply other threads:[~2011-07-18 15:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-18 14:26 SP in committer line in fast-import stream SASAKI Suguru
2011-07-18 15:38 ` Dmitry Ivankov [this message]
2011-07-18 16:18 ` SASAKI Suguru
2011-07-18 16:57 ` Dmitry Ivankov
2011-07-18 19:10 ` SASAKI Suguru
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=loom.20110718T172927-173@post.gmane.org \
--to=divanorama@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox